Hi Yoko and all, 1.6.0 introduces a new system property to control a useful new behavior in the JSR223 implementation:
org.jruby.embed.classloader: current | none as documented here: http://yokolet.blogspot.com/2011/01/embedding-api-refinements-for-jruby.html I have a small quibble with the feature. As documented, it sets the classloader to the classloader that was used to load the JRuby ScriptingContainer, which is a handy default behavior because it will catch all the material bundled in JRuby's JARs, and gems and other Ruby material should just work as expected. But the word "current" is often (mistakenly, IMHO) used to refer to the context classloader, that accessed via Thread.currentThread().getContextClassLoader(). And it has a meaning in ordinary English as well. So I think the use of the word "current" here for the property might be confusing, since in fact it sets a classloader that is not relevant to the current thread or the current invoking class, but actually the classloader that was used to load JRuby, likely at some other time and place that is not "current" in the natural use of the term. I have some cases where the context class loader would be useful, too. So I would prefer having three options: org.jruby.embed.classloader: context | jruby | none where "context" would inject the value of the context classloader at Engine invocation time, "jruby" would inject the ScriptingContainer classloader as "current" now does, and "none" continues to take no action as in the current implementation. I think "jruby" should still be the default, as that is what most people would want. If any of that makes sense, I'm happy to supply the patches. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email