Project

General

Profile

« Previous | Next » 

Revision a17a33b3

Added by koic (Koichi ITO) over 1 year ago

[ruby/prism] Follow ruby/prism#2581

Due to ruby/prism#2581, the test case for non_alphanumeric_methods.txt has also been restored.
It also solved issues with def self.' not limited to constants for tBACK_REF2 token.

$ bundle exec ruby -Ilib -rprism -rprism/translation/parser33 -ve \
'buf = Parser::Source::Buffer.new("example.rb"); buf.source = "def self.`; end"; p Prism::Translation::Parser33.new.tokenize(buf)[2]'
ruby 3.3.0 (2023-12-25 revision https://github.com/ruby/prism/commit/5124f9ac75) [x86_64-darwin22]
[[:kDEF, ["def", #<Parser::Source::Range example.rb 0...3>]], [:kSELF, ["self", #<Parser::Source::Range example.rb 4...8>]],
[:tDOT, [".", #<Parser::Source::Range example.rb 8...9>]], [:tBACK_REF2, ["`", #<Parser::Source::Range example.rb 9...10>]],
[:tSEMI, [";", #<Parser::Source::Range example.rb 10...11>]], [:kEND, ["end", #<Parser::Source::Range example.rb 12...15>]]]

https://github.com/ruby/prism/commit/f814db8ada