From: "alanwu (Alan Wu) via ruby-core" Date: 2026-12-03T23:41:39+00:00 Subject: [ruby-core:127824] [Ruby Bug#22712] YJIT sometimes does not pass &block_argument properly with super Issue #22712 has been reported by alanwu (Alan Wu). ---------------------------------------- Bug #22712: YJIT sometimes does not pass &block_argument properly with super https://bugs.ruby-lang.org/issues/22712 * Author: alanwu (Alan Wu) * Status: Open * Backport: 3.3: REQUIRED, 3.4: REQUIRED, 4.0: REQUIRED ---------------------------------------- ```ruby # --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`. Will send PR shortly. -- 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/