forked from rubocop/rubocop
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix rubocop#6822] Fix Lint/LiteralInInterpolation autocorrection for…
… single quotes ## Current behavior: Doing `$ rubocop --only Lint/LiteralInInterpolation`; source: ```ruby x = "ABC".gsub(/(A)(B)(C)/, "D#{'\2'}F") "foo#{'\n'}bar" "this is #{'"'} silly" ``` corrected to: ```ruby x = "ABC".gsub(/(A)(B)(C)/, "D\2F") "foo\nbar" "this is " silly" ``` ## New behavior: corrected to: ```ruby x = "ABC".gsub(/(A)(B)(C)/, "D\\2F") "foo\\nbar" "this is \" silly" ```
- Loading branch information
1 parent
95d2110
commit 5849678
Showing
3 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters