From: "nagachika (Tomoyuki Chikanaga)" Date: 2013-05-05T12:39:13+09:00 Subject: [ruby-core:54791] [ruby-trunk - Bug #8367][Assigned] regression in defined?(super) starting with 2.0.0-p0 Issue #8367 has been updated by nagachika (Tomoyuki Chikanaga). Category set to core Status changed from Open to Assigned Assignee set to nobu (Nobuyoshi Nakada) Target version set to current: 2.1.0 Backport changed from 1.9.3: UNKNOWN, 2.0.0: UNKNOWN to 1.9.3: UNKNOWN, 2.0.0: REQUIRED ---------------------------------------- Bug #8367: regression in defined?(super) starting with 2.0.0-p0 https://bugs.ruby-lang.org/issues/8367#change-39131 Author: indirect (Andr�� Arko) Status: Assigned Priority: Normal Assignee: nobu (Nobuyoshi Nakada) Category: core Target version: current: 2.1.0 ruby -v: ruby 2.1.0dev (2013-05-03 trunk 40571) [x86_64-darwin12.3.0] Backport: 1.9.3: UNKNOWN, 2.0.0: REQUIRED =begin Hello, I have discovered a regression in the behaviour of (({defined?(super)})). It functions as expected in 1.9.3-p392, but has changed in 2.0.0-p0 and in 2.1.0dev (2013-05-03 trunk 40571). On Ruby 1.9.3, the call returns the string (({"super"})). On 2.0.0-p0 and above, the call returns (({nil})). The change seems to be specific to the inside of a block in a method that is defined in a module that is extended onto the object where the method is called. This is a minimal reproduction example, which I have also attached as "super-gone.rb". class C def x; end end module M def b; yield; end def x b do # On 1.9.3, this is "super", but on 2.0.0 it is nil p defined?(super) end end end c = C.new c.extend M c.x Thank you. =end -- http://bugs.ruby-lang.org/