diff options
| author | Earlopain <14981592+Earlopain@users.noreply.github.com> | 2025-01-13 16:41:29 +0100 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2025-01-13 18:02:28 +0000 |
| commit | 7c0b92a1c64d39d4861fb7b46db7efdff3bbcf65 (patch) | |
| tree | cbcb1d8ff1775b3c7d1a51bda31849a838a13cbf /lib | |
| parent | 6637aa4682ef64134e05af949a9beee260dab937 (diff) | |
[ruby/prism] Fix parser translator tokens for `%x(#{})`
It falsely considered it to be a single backtick command
https://github.com/ruby/prism/commit/dd762be590
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/prism/translation/parser/lexer.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/prism/translation/parser/lexer.rb b/lib/prism/translation/parser/lexer.rb index ace40df5d8..a54d355652 100644 --- a/lib/prism/translation/parser/lexer.rb +++ b/lib/prism/translation/parser/lexer.rb @@ -482,7 +482,8 @@ module Prism type = :tIDENTIFIER end when :tXSTRING_BEG - if (next_token = lexed[index][0]) && next_token.type != :STRING_CONTENT && next_token.type != :STRING_END + if (next_token = lexed[index][0]) && !%i[STRING_CONTENT STRING_END EMBEXPR_BEGIN].include?(next_token.type) + # self.`() type = :tBACK_REF2 end quote_stack.push(value) |
