rails/rails — comment on commit 11f6795b238172c4a13176062bd38b83285799b7
File: activesupport/test/core_ext/module/qualified_const_test.rb line 31
By fxn:

Exactly, const_defined? looks only into the receiver in 1.8, whereas 1.9 checks also its ancestors by default (the 2nd argument allows you to disable that).

That's a gotcha in 1.8 because const_get on the other hand does check ancestors, so M.const_defined?("Foo") may return false, and stil M.const_get("Foo") find a value.

The new methods are defined to behave like their counterparts, per Ruby version, as one would expect.