From: "Eregon (Benoit Daloze)" Date: 2022-03-10T17:47:34+00:00 Subject: [ruby-core:107838] [Ruby master Feature#18621] Fiber.yield loses the fact it was kwargs from Fiber#resume Issue #18621 has been updated by Eregon (Benoit Daloze). And thank you for this fast and detailed reply :) ---------------------------------------- Feature #18621: Fiber.yield loses the fact it was kwargs from Fiber#resume https://bugs.ruby-lang.org/issues/18621#change-96768 * Author: Eregon (Benoit Daloze) * Status: Rejected * Priority: Normal ---------------------------------------- ```ruby f = Fiber.new do args = Fiber.yield args end f.resume args = f.resume(a: 1) Hash.ruby2_keywords_hash?(args) # => false, but should be true, isn't it? ``` This also means if there is `foo(*args)` later and `foo` would require kwargs it would fail: ```ruby def foo(a: 1) = a f = Fiber.new do args = Fiber.yield args end f.resume args = f.resume(a: 1) foo(*args) # => # -:1:in `foo': wrong number of arguments (given 1, expected 0) (ArgumentError) # from -:9:in `
' ``` cc @jeremyevans0 @mame -- https://bugs.ruby-lang.org/ Unsubscribe: