The attached patch fixes this. It has been around for better than a week, but it only exists on my branch. I'm not entirely happy with the new RubyModule.definePublicModuleFunction, because it doesn't seem quite in the spirit of how module functions work; however, I'm not entirely positive the correct way for module functions to work internally so that Kernel#public_instance_methods will show the right list. This patch seems to fix all issues, but I'd like to hear opinions (and I'd certainly like those of you using this on projects to try JRuby HEAD with this patch added).
You'll need this patch if you intend to play with Rails' generate script at all, as well. generate works on my branch, but not yet on HEAD (and probably not in the upcoming 0.8.3 release, unfortunately).
--
Charles Oliver Nutter @ headius.blogspot.com
JRuby Developer @ jruby.sourceforge.net
Application Architect @ www.ventera.com
object-modules-in-kernel.patch
Description: Binary data
