On Nov 7, 2009, at 3:02 PM, James Britt wrote:
Hirotsugu Asari wrote:
I haven't read too much into the issue, so correct me if I'm wrong.
As I understand it, by the time org.jruby.Ruby.parseFile() is
called on test.rb, an org.jruby.Ruby.init() has already been called
and builtins has already been loaded. By the same token, "prelude",
"java", etc., are also susceptible to this startup logic.
I don't think so.
I added a puts call to to my copy of src/builtin.generator.rb to
announce when it was loaded. I only see that if I call "require
'generator' (no matter how I arrange my $: values).
If you take test.rb, drop the call to "require 'generator'", and
have it print something and exit, src/builtin.generator.rb does not
get loaded.
So It appears to be a load path issue.
James
Hi, James,
You're right about what is actually loaded. Upon further reading, I
see that JRuby won't load these builtin libraries during startup; it
just populates builtinLibraries.
When it comes time to 'require',
org.jruby.runtime.load.LoadService.findLibraryWithoutCWD() looks for
built-in libraries first no matter what. There, only builtinLibraries
is consulted to find an appropriate library.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email