summaryrefslogtreecommitdiff
path: root/test/prism/ruby
diff options
context:
space:
mode:
authorEarlopain <14981592+Earlopain@users.noreply.github.com>2025-11-07 13:14:07 +0100
committergit <svn-admin@ruby-lang.org>2025-11-08 00:22:17 +0000
commit7037d8f89e71a13547d031d76747e45cfe930c9f (patch)
tree8dafdfa9d7e39809bdecdc97007218f84be2e6d1 /test/prism/ruby
parenta7c23b9a9f726bec7cbd6f89d157d7dd140420da (diff)
[ruby/prism] Rename Ruby 3.5 to Ruby 4.0
See https://github.com/ruby/ruby/commit/6d81969b475262aba251e99b518181bdf7c5a523 It leaves the old variant around. RuboCop for examples accesses `Prism::Translation::Parser35` to test against ruby-head. For now I left these simply as an alias https://github.com/ruby/prism/commit/d0a823f045
Diffstat (limited to 'test/prism/ruby')
-rw-r--r--test/prism/ruby/parser_test.rb7
-rw-r--r--test/prism/ruby/ripper_test.rb4
-rw-r--r--test/prism/ruby/ruby_parser_test.rb4
3 files changed, 8 insertions, 7 deletions
diff --git a/test/prism/ruby/parser_test.rb b/test/prism/ruby/parser_test.rb
index 3104369d3e..1629c36b38 100644
--- a/test/prism/ruby/parser_test.rb
+++ b/test/prism/ruby/parser_test.rb
@@ -69,10 +69,10 @@ module Prism
"3.4/circular_parameters.txt",
# Cannot yet handling leading logical operators.
- "3.5/leading_logical.txt",
+ "4.0/leading_logical.txt",
- # Ruby >= 3.5 specific syntax
- "3.5/endless_methods_command_call.txt",
+ # Ruby >= 4.0 specific syntax
+ "4.0/endless_methods_command_call.txt",
# https://bugs.ruby-lang.org/issues/21168#note-5
"command_method_call_2.txt",
@@ -172,6 +172,7 @@ module Prism
if RUBY_VERSION >= "3.3"
def test_current_parser_for_current_ruby
major, minor = current_major_minor.split(".")
+ return if major == "3" && minor == "5" # TODO: Remove once ruby-dev becomes 4.0
# Let's just hope there never is a Ruby 3.10 or similar
expected = major.to_i * 10 + minor.to_i
assert_equal(expected, Translation::ParserCurrent.new.version)
diff --git a/test/prism/ruby/ripper_test.rb b/test/prism/ruby/ripper_test.rb
index 12c854aea6..400139acc0 100644
--- a/test/prism/ruby/ripper_test.rb
+++ b/test/prism/ruby/ripper_test.rb
@@ -9,7 +9,7 @@ module Prism
# Skip these tests that Ripper is reporting the wrong results for.
incorrect = [
# Not yet supported.
- "3.5/leading_logical.txt",
+ "4.0/leading_logical.txt",
# Ripper incorrectly attributes the block to the keyword.
"seattlerb/block_break.txt",
@@ -40,7 +40,7 @@ module Prism
"3.4/circular_parameters.txt",
# https://bugs.ruby-lang.org/issues/17398#note-12
- "3.5/endless_methods_command_call.txt",
+ "4.0/endless_methods_command_call.txt",
# https://bugs.ruby-lang.org/issues/21168#note-5
"command_method_call_2.txt",
diff --git a/test/prism/ruby/ruby_parser_test.rb b/test/prism/ruby/ruby_parser_test.rb
index 42a888be82..fae5077e20 100644
--- a/test/prism/ruby/ruby_parser_test.rb
+++ b/test/prism/ruby/ruby_parser_test.rb
@@ -84,8 +84,8 @@ module Prism
"3.4/circular_parameters.txt",
- "3.5/endless_methods_command_call.txt",
- "3.5/leading_logical.txt",
+ "4.0/endless_methods_command_call.txt",
+ "4.0/leading_logical.txt",
# https://bugs.ruby-lang.org/issues/21168#note-5
"command_method_call_2.txt",