jruby-1.6.8 :089 > defined? Foo::Bar => nil jruby-1.6.8 :090 > Foo::Bar NameError: uninitialized constant Foo::Bar
z = x.y
z == x.y # => true
defined?(z) == defined?(x.y) # => false