diff options
-rw-r--r-- | parse.y | 2 | ||||
-rw-r--r-- | test/ruby/test_pattern_matching.rb | 2 |
2 files changed, 4 insertions, 0 deletions
@@ -3964,11 +3964,13 @@ p_expr_basic : p_value | tLBRACE { $<tbl>$ = push_pktbl(p); + $<flags>1 = p->in; p->in.kwarg = 0; } p_kwargs rbrace { pop_pktbl(p, $<tbl>2); + p->in.kwarg = $<flags>1.kwarg; $$ = new_hash_pattern(p, Qnone, $3, &@$); } | tLBRACE rbrace diff --git a/test/ruby/test_pattern_matching.rb b/test/ruby/test_pattern_matching.rb index 3eea523416..3c4314bbe4 100644 --- a/test/ruby/test_pattern_matching.rb +++ b/test/ruby/test_pattern_matching.rb @@ -1060,6 +1060,8 @@ END in {a: 2} false + in a: {b:}, c: + p c in {a: } _a = a |