Inconsistent behaviour of Module#const_get with included modules
|ruby -v:||ruby 1.9.2dev (2010-05-31 revision 28117) [x86_64-darwin10.3.0]||Backport:|
A = 1
Object.const_get(:A, false) # => works fine
Bar.const_get(:A, false) # => raises error
Untested patch attached. This might also fix #3422.
- insns.def (defineclass), vm_insnhelper.c (vm_get_cvar_base): see also inherited constants for classes without superclass and modules. [Bug #3423]
#4 Updated by Yukihiro Matsumoto over 3 years ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r32283.
Magnus, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.