From: Nobuyoshi Nakada Date: 2006-09-21T12:41:34+09:00 Subject: Re: const_defined? not quite in sync with const_get ?? Hi, Sorry for mispost. At Thu, 21 Sep 2006 02:06:56 +0900, Chris Roos wrote in [ruby-talk:215393]: > Foo::Bar > #=> missing konst Bar # Unsurprising behaviour > > p Foo::const_defined?(:Bar) > false # Unsurprising behaviour > > p Foo::const_get(:Bar) > #=> Bar # Surprising behaviour It has changed in 1.9. p Foo::const_defined?(:Bar) #=> true p Foo::const_get(:Bar) #=> Bar p Foo::const_defined?(:Bar, false) #=> false p Foo::const_get(:Bar, false) #=> missing konst Bar -- Nobu Nakada