Skip to content

Commit

Permalink
Fix n-th-ref dstring interpolation
Browse files Browse the repository at this point in the history
  • Loading branch information
mbj committed Nov 9, 2020
1 parent 7ca6e76 commit 60a03d6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/unparser/writer/dynamic_string.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class DynamicString
]
)

FLAT_INTERPOLATION = %i[ivar cvar gvar].to_set.freeze
FLAT_INTERPOLATION = %i[ivar cvar gvar nth_ref].to_set.freeze

private_constant(*constants(false))

Expand Down
4 changes: 4 additions & 0 deletions test/corpus/literal/dstr.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,7 @@
#{}
#{}
HEREDOC
"a#$1"
"a#$a"
"a#@a"
"a#@@a"

0 comments on commit 60a03d6

Please sign in to comment.