Issue Type: Bug Bug
Affects Versions: JRuby 1.7.1
Assignee: Unassigned
Components: Java Integration
Created: 10/Dec/12 3:10 PM
Description:

Ok, this is an admittedly bizarre use case, but bear with me... If you call Java code that creates a ScriptingContainer from JRuby, the ScriptingContainer's terminate() will invoke at_exits from the original JRuby environment.

package bug;

import org.jruby.embed.ScriptingContainer;

public class ExitCeption {
  public static void helloWorld() {
    Runtime.getRuntime().gc(); // force finalizing of earlier ScriptingContainer
    ScriptingContainer container = new ScriptingContainer();
    container.runScriptlet("puts 'hello world'");
  }
}
require 'java'

java_import 'bug.ExitCeption'

at_exit do
  puts "It's all come to an end..."
end

loop do
  # will print at_exit message on second run, then die on the third run
  ExitCeption.helloWorld
  sleep 1
end
Project: JRuby
Priority: Major Major
Reporter: Emil Ong
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
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

Reply via email to