From a17a33b38e994564268d0fc0642cd8b569dd65ce Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Wed, 13 Mar 2024 00:25:10 +0900 Subject: [PATCH] [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. ```console $ 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", #]], [:kSELF, ["self", #]], [:tDOT, [".", #]], [:tBACK_REF2, ["`", #]], [:tSEMI, [";", #]], [:kEND, ["end", #]]] ``` https://github.com/ruby/prism/commit/f814db8ada --- test/prism/parser_test.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/test/prism/parser_test.rb b/test/prism/parser_test.rb index 480a31f6815c70..60fe0e0f474eeb 100644 --- a/test/prism/parser_test.rb +++ b/test/prism/parser_test.rb @@ -76,7 +76,6 @@ class ParserTest < TestCase "heredocs_leading_whitespace.txt", "heredocs_nested.txt", "indented_file_end.txt", - "non_alphanumeric_methods.txt", "strings.txt", "xstring.txt" ]