Skip to content

Style/StringConcatenation doesn't respect single quotes when autocorrecting #14502

@Zopolis4

Description

@Zopolis4

As split out from #14499.

Expected behavior

To respect the single quotes of '#{foo}'.

Actual behavior

"" + '#{foo}' autocorrects to "#{foo}".

Steps to reproduce the problem

"" + '#{foo}'

rubocop --only Style/StringConcatenation -A

RuboCop version

1.80.1 (using Parser 3.3.9.0, rubocop-ast 1.46.0, analyzing as Ruby 2.7, running on ruby 3.4.4) [x86_64-linux-gnu]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions