Issue #3422 has been updated by Yui NARUSE.

ruby -v changed from - to ruby 1.9.2dev (2010-05-31 revision 28117) [x86_64-darwin10.3.0]

nobu lazily closed this ticket without the revision reference: r33163.
----------------------------------------
Bug #3422: Object.const_get(:A, false) can access BasicObject::A
http://redmine.ruby-lang.org/issues/3422

Author: Magnus Holm
Status: Closed
Priority: Normal
Assignee: Yukihiro Matsumoto
Category: core
Target version: 1.9.3
ruby -v: ruby 1.9.2dev (2010-05-31 revision 28117) [x86_64-darwin10.3.0]


=begin
 From the documentation of Module#const_get(sym, inherit=true):
 
   If the constant is not defined or is defined by the ancestors and inherit is false, NameError will be raised.
 
 Yet, this works fine:
 
   BasicObject::A = 1
   Object.const_get(:A, false) # => 1
 
 While I haven't tested it, I believe the attached patch should fix the issue.
=end



-- 
http://redmine.ruby-lang.org