
Issue #20505 has been updated by nobu (Nobuyoshi Nakada). I think that's what it is. `Proc` is an instantiated block representation, but not a block itself. ---------------------------------------- Bug #20505: Reassigning the block argument in method body keeps old block when calling super with implicit arguments https://bugs.ruby-lang.org/issues/20505#change-108415 * Author: Earlopain (A S) * Status: Open * ruby -v: 3.3.1 * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- You can call super without arguments and parenthesis to pass along all the enclosing method arguments to the parent method. You can modify positional and keyword arguments before the call to super, and the parent method will recieve these modified values. With the block arg however that isn't the case: ```rb class A def positional_arg(a) puts a end def block_arg(&block) yield end end class B < A def positional_arg(a = nil) a = 'b' super end def block_arg(&block) block = proc { puts 'b' } super end end B.new.positional_arg('a') B.new.positional_arg B.new.block_arg { puts 'a' } B.new.block_arg ``` I would expect this snippet to print `b` four times. The actual output is `b` `b` `a` and `LocalJumpError`. To get the desired output I must pass the block along explicitly with `super(&block)`. I hope my example explains the issue good enough. I have looked through issues here and searched for documentation and haven't found any mention of this behaviour. Sorry if I missed something somewhere. -- https://bugs.ruby-lang.org/