This seems peculiar to me:

cout@bean:~/tmp$ ruby -e 'module M; FOO = 42; end; class Foo; include M; end; p Foo.const_defined?(:FOO)'
false
cout@bean:~/tmp$ ruby -e 'Kernel.const_set(:FOO, 42); p Object.const_defined?(:FOO)'
true
cout@bean:~/tmp$ ruby -e 'Kernel.const_set(:FOO, 42); p Class.const_defined?(:FOO)'
false

Is there a reason for this behavior?

Paul