@@ -8,44 +8,34 @@ module Prism
88 class RipperTest < TestCase
99 # Skip these tests that Ripper is reporting the wrong results for.
1010 incorrect = [
11- # Not yet supported.
12- "4.0/leading_logical.txt" ,
13-
1411 # Ripper incorrectly attributes the block to the keyword.
15- "seattlerb/block_break.txt" ,
16- "seattlerb/block_next.txt" ,
1712 "seattlerb/block_return.txt" ,
18- "whitequark/break_block.txt" ,
19- "whitequark/next_block.txt" ,
2013 "whitequark/return_block.txt" ,
2114
22- # Ripper is not accounting for locals created by patterns using the **
23- # operator within an `in` clause.
24- "seattlerb/parse_pattern_058.txt" ,
25-
2615 # Ripper cannot handle named capture groups in regular expressions.
2716 "regex.txt" ,
28- "regex_char_width.txt" ,
29- "whitequark/lvar_injecting_match.txt" ,
3017
3118 # Ripper fails to understand some structures that span across heredocs.
3219 "spanning_heredoc.txt" ,
3320
34- "3.3-3.3/block_args_in_array_assignment.txt" ,
35- "3.3-3.3/it_with_ordinary_parameter.txt" ,
36- "3.3-3.3/keyword_args_in_array_assignment.txt" ,
37- "3.3-3.3/return_in_sclass.txt" ,
38-
39- # https://bugs.ruby-lang.org/issues/20478
21+ # Ripper interprets circular keyword arguments as method calls.
4022 "3.4/circular_parameters.txt" ,
4123
42- # https://bugs.ruby-lang.org/issues/17398#note-12
24+ # Ripper doesn't emit `args_add_block` when endless method is prefixed by modifier.
4325 "4.0/endless_methods_command_call.txt" ,
4426
4527 # https://bugs.ruby-lang.org/issues/21168#note-5
4628 "command_method_call_2.txt" ,
4729 ]
4830
31+ if RUBY_VERSION . start_with? ( "3.3." )
32+ incorrect += [
33+ "whitequark/lvar_injecting_match.txt" ,
34+ "seattlerb/parse_pattern_058.txt" ,
35+ "regex_char_width.txt" ,
36+ ]
37+ end
38+
4939 # Skip these tests that we haven't implemented yet.
5040 omitted = [
5141 "dos_endings.txt" ,
@@ -68,7 +58,7 @@ class RipperTest < TestCase
6858 "whitequark/slash_newline_in_heredocs.txt"
6959 ]
7060
71- Fixture . each ( except : incorrect | omitted ) do |fixture |
61+ Fixture . each_for_current_ruby ( except : incorrect | omitted ) do |fixture |
7262 define_method ( fixture . test_name ) { assert_ripper ( fixture . read ) }
7363 end
7464
0 commit comments