Skip to content

Commit

Permalink
- ruby32.y: fix using p_kwnorest in f_no_kwarg (#848)
Browse files Browse the repository at this point in the history
  • Loading branch information
palkan committed Apr 5, 2022
1 parent 934bd00 commit 1d275fc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions lib/parser/ruby32.y
Original file line number Diff line number Diff line change
Expand Up @@ -2252,11 +2252,14 @@ opt_block_args_tail:
p_kwnorest: kwrest_mark kNIL
{
result = [ @builder.match_nil_pattern(val[0], val[1]) ]
result = val
}
p_any_kwrest: p_kwrest
| p_kwnorest
{
result = [ @builder.match_nil_pattern(val[0][0], val[0][1]) ]
}
p_value: p_primitive
| p_primitive tDOT2 p_primitive
Expand Down Expand Up @@ -2969,7 +2972,7 @@ f_opt_paren_args: f_paren_args
f_no_kwarg: p_kwnorest
{
result = [ @builder.kwnilarg(val[0], val[1]) ]
result = [ @builder.kwnilarg(val[0][0], val[0][1]) ]
}
f_kwrest: kwrest_mark tIDENTIFIER
Expand Down
2 changes: 1 addition & 1 deletion test/parse_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module ParseHelper
require 'parser/macruby'
require 'parser/rubymotion'

ALL_VERSIONS = %w(1.8 1.9 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 3.0 3.1 mac ios)
ALL_VERSIONS = %w(1.8 1.9 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7 3.0 3.1 3.2 mac ios)

def setup
@diagnostics = []
Expand Down

0 comments on commit 1d275fc

Please sign in to comment.