Uwe Kubosch created JRUBY-6265: ---------------------------------- Summary: Setting load path on ScriptingContainer with LocalContextScope.SINGLETON does not work Key: JRUBY-6265 URL: https://jira.codehaus.org/browse/JRUBY-6265 Project: JRuby Issue Type: Bug Components: Embedding Affects Versions: JRuby 1.6.5, JRuby 1.7 Environment: OS X 10.7.2 jruby 1.6.5 (ruby-1.8.7-p330) (2011-10-25 9dcd388) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_29) [darwin-x86_64-java]
Reporter: Uwe Kubosch Fix For: JRuby 1.7 See the following jirb session: {noformat} macbeth:ruboto-core uwe$ jirb >> require 'java' => true >> s = >> org.jruby.embed.ScriptingContainer.new(org.jruby.embed.LocalContextScope::SINGLETON) => #<Java::OrgJrubyEmbed::ScriptingContainer:0x4280bc28> >> s.load_paths.add '/tmp' => true >> s.runScriptlet 'p $:' ["/Library/Frameworks/JRuby.framework/Gems/1.8/gems/wirble-0.1.3/lib", "/Library/Frameworks/JRuby.framework/Versions/1.6.5/lib/ruby/site_ruby/1.8", "/Library/Frameworks/JRuby.framework/Versions/1.6.5/lib/ruby/site_ruby/shared", "/Library/Frameworks/JRuby.framework/Versions/1.6.5/lib/ruby/1.8", "."] => nil {noformat} However when using LocalContextScope.SINGLETHREAD the path is added: {noformat} macbeth:ruboto-core uwe$ jirb >> require 'java' => true >> s = >> org.jruby.embed.ScriptingContainer.new(org.jruby.embed.LocalContextScope::SINGLETHREAD) => #<Java::OrgJrubyEmbed::ScriptingContainer:0x441743be> >> s.load_paths.add '/tmp' => true >> s.runScriptlet 'p $:' ["/tmp", "/Library/Frameworks/JRuby.framework/Versions/1.6.5/lib/ruby/site_ruby/1.8", "/Library/Frameworks/JRuby.framework/Versions/1.6.5/lib/ruby/site_ruby/shared", "/Library/Frameworks/JRuby.framework/Versions/1.6.5/lib/ruby/1.8", "."] => nil {noformat} Shouldn't the extra load path be added for SINGLETON as well? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email