File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1488,7 +1488,11 @@ def visit_if_node(node)
1488
1488
consequent = visit ( node . consequent )
1489
1489
1490
1490
bounds ( node . location )
1491
- on_if ( predicate , statements , consequent )
1491
+ if node . if_keyword == "if"
1492
+ on_if ( predicate , statements , consequent )
1493
+ else
1494
+ on_elsif ( predicate , statements , consequent )
1495
+ end
1492
1496
else
1493
1497
statements = visit ( node . statements . body . first )
1494
1498
predicate = visit ( node . predicate )
Original file line number Diff line number Diff line change @@ -57,16 +57,13 @@ class RipperTest < TestCase
57
57
]
58
58
59
59
skips = incorrect | heredocs | %w[
60
- if.txt
61
60
rescue.txt
62
61
seattlerb/TestRubyParserShared.txt
63
62
seattlerb/block_call_dot_op2_brace_block.txt
64
63
seattlerb/block_command_operation_colon.txt
65
64
seattlerb/block_command_operation_dot.txt
66
- seattlerb/if_elsif.txt
67
65
unparser/corpus/literal/block.txt
68
66
unparser/corpus/literal/kwbegin.txt
69
- whitequark/if_elsif.txt
70
67
whitequark/send_block_chain_cmd.txt
71
68
]
72
69
You can’t perform that action at this time.
0 commit comments