Title: `Lint/InterpolationCheck` autocorrect causes a `SyntaxError` · Issue #14791 · rubocop/rubocop · GitHub
Open Graph Title: `Lint/InterpolationCheck` autocorrect causes a `SyntaxError` · Issue #14791 · rubocop/rubocop
X Title: `Lint/InterpolationCheck` autocorrect causes a `SyntaxError` · Issue #14791 · rubocop/rubocop
Description: Description # before autocorrection msg = 'Text `A("#{%
Open Graph Description: Description # before autocorrection msg = 'Text `A("#{%
X Description: Description # before autocorrection msg = 'Text `A("#{%<base>s}/%<path>s")` and `B` with C.' puts format(msg, base: 'bar', path: 'baz') # after msg = %...
Opengraph URL: https://github.com/rubocop/rubocop/issues/14791
X: @github
Domain: redirect.github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`Lint/InterpolationCheck` autocorrect causes a `SyntaxError`","articleBody":"## Description\n\n```ruby\n# before autocorrection\nmsg = 'Text `A(\"#{%\u003cbase\u003es}/%\u003cpath\u003es\")` and `B` with C.'\nputs format(msg, base: 'bar', path: 'baz')\n\n# after\nmsg = %{Text `A(\"#{%\u003cbase\u003es}/%\u003cpath\u003es\")` and `B` with C.}\nputs format(msg, base: 'bar', path: 'baz')\n```\n\n--------\n\n## RuboCop version\n\n```console\n$ rubocop -V\n1.82.1 (using Parser 3.3.10.1, rubocop-ast 1.49.0, analyzing as Ruby 2.7, running on ruby 3.4.7) [x86_64-linux]\n - rubocop-performance 1.26.1\n - rubocop-rake 0.7.1\n - rubocop-rspec 3.9.0\n```","author":{"url":"https://github.com/ydakuka","@type":"Person","name":"ydakuka"},"datePublished":"2026-01-17T20:41:16.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/14791/rubocop/issues/14791"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a04c37fe-ad7a-172b-b5ee-53b60f58be69 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A938:352D9:4BEF011:65C4245:6A655777 |
| html-safe-nonce | 74ec89afbda21c3d997d5de83d8d0f67ebc3d15cbe855cfb60d56c4746309777 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOTM4OjM1MkQ5OjRCRUYwMTE6NjVDNDI0NTo2QTY1NTc3NyIsInZpc2l0b3JfaWQiOiI1MjM2NDY4NzIzNzEzNjYwNzkxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | c5df0c831b0f88327e473ab18eead8270cfe2de1ca6347efbc7a82cf19086364 |
| hovercard-subject-tag | issue:3825797638 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/rubocop/rubocop/14791/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f88a3436a1e77a8625055ee513e5390a3d087c098e8e64f0312551c448b4fccf/rubocop/rubocop/issues/14791 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f88a3436a1e77a8625055ee513e5390a3d087c098e8e64f0312551c448b4fccf/rubocop/rubocop/issues/14791 |
| og:image:alt | Description # before autocorrection msg = 'Text `A("#{% |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ydakuka |
| hostname | github.com |
| expected-hostname | github.com |
| None | 52c76df668885aaff23b50bdca1fa1ea44ac9c1553e888ebc70ff1e4daa4625b |
| turbo-cache-control | no-preview |
| go-import | github.com/rubocop/rubocop git https://github.com/rubocop/rubocop.git |
| octolytics-dimension-user_id | 10871348 |
| octolytics-dimension-user_login | rubocop |
| octolytics-dimension-repository_id | 4095287 |
| octolytics-dimension-repository_nwo | rubocop/rubocop |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 4095287 |
| octolytics-dimension-repository_network_root_nwo | rubocop/rubocop |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 309153364422b3c499922d1a2a6404910a58ed8e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width