Issue #7414 has been updated by robertgleeson (Robert Gleeson).


I realise defined? with a constant works just as well but this is about API constancy.
I'd expect const_get & const_defined? to support the same query language ("Object::Foo").
----------------------------------------
Feature #7414: Now that const_get supports "Foo::Bar" syntax, so should const_defined?.
https://bugs.ruby-lang.org/issues/7414#change-33356

Author: robertgleeson (Robert Gleeson)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 2.0.0


class Foo
end
Object.const_get "Object::Foo" => Foo
Object.const_defined? "Object::Foo" => NameError (expected true).


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