Actions
Bug #22712
closedYJIT sometimes does not pass &block_argument properly with super
Bug #22712:
YJIT sometimes does not pass &block_argument properly with super
Description
# --yjit-call-threshold=1
class A
def foo(x) = block_given? ? :got_block : :no_block
end
class B < A
def foo(x) = super(x, &nil)
end
b = B.new
arg = b
arg = 0 if ENV['MASK']
p(b.foo(arg) {}) # => :got_block, should be :no_block
The argument being an instance of B is important. YJIT's reading of the wrong slot for super's is-a check can easily mask this bug as invokesuper_defined_class_mismatch.
Actions