jruby/jruby — pull request #636 by BanzaiMan (2013-04-14 03:58:23+00:00)
Title: BasicObject.constants should return [:BasicObject].

This fixes a RubySpec:

BasicObject.constants # => [:BasicObject]

`Module#constants` starts searching with `Object`, down to the current module itself for constants, so `BasicObject.constants` never gets a chance to inject `:BasicObject` to that list.

This hard codes `"BasicObject"`, which doesn't seem right to me. However, this invocation needs to be static, and I could not find an elegant way to obtain the class name.

Of course, there may be a entirely different and more elegant solution to this problem.