Incorrect handling of multiple-byte characters in double-quote string literal Rubocop quickfix
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
Research direction
Start by reproducing the quickfix with the stated Style/StringLiterals configuration and a single-quoted string containing multi-byte Unicode characters. Trace the Ruby LSP handling of the RuboCop quickfix; done means the converted string preserves its Unicode content and removes the original closing single quote.
Written by the indexing model from the issue text.
Description
Description
Performing a quickfix on a single-quoted string literal, when a rubocop rule preferring double-quotes is active, outputs a double-quoted string with utf-8 content garbled.
Ruby LSP Information
neovim:
NVIM v0.12.3-dev-53+g0aa77cb78c
Build type: RelWithDebInfo
LuaJIT 2.1.1774638290
ruby:
ruby 3.4.7 (2025-10-08 revision 7a5688e2a2) +PRISM [x86_64-linux]
ruby-lsp: tested on 0.26.9 and 0.27.0.beta2
Reproduction steps
- Setup rubocop in project with this rule
Style/StringLiterals:
EnforcedStyle: single_quotes
- Write a single quoted string containing multi-byte unicode characters
- Perform quickfix
- Unicode escape sequence is added and the last single-quote is not removed
https://github.com/user-attachments/assets/b163062d-b53c-413d-9e54-53acfe3d1b4b
- Dominant language
- Ruby
- Stars
- 2k
- Forks
- 281
- Avg merge
- 1h 47m
- Merged PRs (30d)
- 8
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Shopify/ruby-lsp
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug help-wanted pinned
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug pinned
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 68/100
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
All issues in Shopify/ruby-lsp
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
palladius/rails8-app-on-gcp#145 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
rubocop/rubocop-rspec#2236 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
riscv/riscv-unified-db#2624 · 1 reaction ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100