[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/
participants (1)
-
kddnewton (Kevin Newton)