File tree Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -931,7 +931,26 @@ def visit_false_node(node)
931
931
# foo => [*, bar, *]
932
932
# ^^^^^^^^^^^
933
933
def visit_find_pattern_node ( node )
934
- raise NoMethodError , __method__
934
+ constant = visit ( node . constant )
935
+ left =
936
+ if node . left . expression . nil?
937
+ bounds ( node . left . location )
938
+ on_var_field ( nil )
939
+ else
940
+ visit ( node . left . expression )
941
+ end
942
+
943
+ requireds = visit_all ( node . requireds ) if node . requireds . any?
944
+ right =
945
+ if node . right . expression . nil?
946
+ bounds ( node . right . location )
947
+ on_var_field ( nil )
948
+ else
949
+ visit ( node . right . expression )
950
+ end
951
+
952
+ bounds ( node . location )
953
+ on_fndptn ( constant , left , requireds , right )
935
954
end
936
955
937
956
# if foo .. bar; end
Original file line number Diff line number Diff line change @@ -371,8 +371,6 @@ class RipperFixturesTest < RipperTestCase
371
371
seattlerb/case_in.txt
372
372
seattlerb/case_in_37.txt
373
373
seattlerb/case_in_else.txt
374
- seattlerb/case_in_find.txt
375
- seattlerb/case_in_find_array.txt
376
374
seattlerb/case_in_hash_pat.txt
377
375
seattlerb/case_in_hash_pat_assign.txt
378
376
seattlerb/case_in_hash_pat_paren_assign.txt
@@ -590,7 +588,6 @@ class RipperFixturesTest < RipperTestCase
590
588
unparser/corpus/literal/rescue.txt
591
589
unparser/corpus/literal/send.txt
592
590
unparser/corpus/literal/since/27.txt
593
- unparser/corpus/literal/since/30.txt
594
591
unparser/corpus/literal/since/31.txt
595
592
unparser/corpus/literal/since/32.txt
596
593
unparser/corpus/literal/super.txt
You can’t perform that action at this time.
0 commit comments