Actions
Bug #20799
closedBug in forwarding to struct methods
ruby -v:
ruby 3.4.0dev (2024-10-15T18:34:24Z master f45eb3dcb9) +PRISM [arm64-darwin24]
Description
This program crashes:
Thing = Struct.new(:value)
Obj = Thing.new("ok")
def delegate(...)
Obj.value(...)
end
def no_args
delegate
end
def splat_args(*args)
delegate(*args)
end
no_args
splat_args
It's crashing because we're forwarding to a struct method without taking in to account the forwarding IC. I have a patch prepared, but I am filing this ticket to track it.
Actions
Like0
Like0Like0Like0