From: "kddnewton (Kevin Newton) via ruby-core" Date: 2026-11-09T22:05:09+00:00 Subject: [ruby-core:127388] [Ruby Bug#22526] parse.y m(**h, **{}) Issue #22526 has been reported by kddnewton (Kevin Newton). ---------------------------------------- Bug #22526: parse.y m(**h, **{}) https://bugs.ruby-lang.org/issues/22526 * Author: kddnewton (Kevin Newton) * Status: Open * Backport: 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN ---------------------------------------- In parse.y `foo(**h, **{})` passes `h` through as if it were `foo(**h)` ```ruby def kw(**k) = k p kw(**Hash.new(5), **{}).default # expected nil, got 5 p kw(**Hash.new { 7 }, **{})[:x] # expected nil, got 7 p kw(**{a: 1}.compare_by_identity, **{}).compare_by_identity? # expected false, got true p kw(**Class.new(Hash).new, **{}).class == Hash # expected true, got false ``` -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/