diff --git a/go b/go index a15683c6cb70d..9f73088d191c6 100755 --- a/go +++ b/go @@ -1,3 +1,3 @@ #!/bin/bash -java -Djruby.launch.inproc=false -jar third_party/jruby/jruby-complete-1.5.0.RC2.jar -S rake $* +java -jar third_party/jruby/jruby-complete-1.5.0.RC2.jar -S rake $* diff --git a/go.bat b/go.bat index ee3a761bce5c9..4358164905fbf 100755 --- a/go.bat +++ b/go.bat @@ -1,2 +1,2 @@ @echo off -java -Djruby.launch.inproc=false -jar third_party\jruby\jruby-complete-1.5.0.RC2.jar -S rake %* +java -jar third_party\jruby\jruby-complete-1.5.0.RC2.jar -S rake %* diff --git a/rake-tasks/crazy_fun/mappings/ruby.rb b/rake-tasks/crazy_fun/mappings/ruby.rb index d46ce0aaabc85..25d2c0f0e298a 100644 --- a/rake-tasks/crazy_fun/mappings/ruby.rb +++ b/rake-tasks/crazy_fun/mappings/ruby.rb @@ -248,15 +248,13 @@ class RubyRunner JRUBY_JAR = "third_party/jruby/jruby-complete-1.5.0.RC2.jar" def self.run(impl, opts) - cmd = [] + cmd = ["ruby"] - case impl.to_sym - when :jruby - cmd << "java" - cmd << "-Djava.awt.headless=true" if opts[:headless] - cmd << "-jar" << JRUBY_JAR + if impl.to_sym == :jruby + JRuby.runtime.instance_config.run_ruby_in_process = true + cmd << "-J-Djava.awt.headless=true" if opts[:headless] else - cmd << impl.to_s + JRuby.runtime.instance_config.run_ruby_in_process = false end if opts[:debug] @@ -286,9 +284,6 @@ def jruby(opts) RubyRunner.run :jruby, opts end - def ruby(opts) - # if we're running on jruby, -Djruby.launch.inproc=false needs to be set for this to work. - # otherwise sh("ruby", ...) will reuse the current JVM RubyRunner.run :ruby, opts end diff --git a/rb/spec/selenium/webdriver/support/jruby_test_environment.rb b/rb/spec/selenium/webdriver/support/jruby_test_environment.rb index fef31e65ad3aa..e6706c1bf7c83 100644 --- a/rb/spec/selenium/webdriver/support/jruby_test_environment.rb +++ b/rb/spec/selenium/webdriver/support/jruby_test_environment.rb @@ -20,10 +20,7 @@ def quit private def in_process_test_environment - @in_process_test_environment ||= begin - puts "creating InProcessTestEnvironment" - org.openqa.selenium.environment.InProcessTestEnvironment.new - end + @in_process_test_environment ||= org.openqa.selenium.environment.InProcessTestEnvironment.new end end # JRubyTestEnvironmnet diff --git a/rb/spec/selenium/webdriver/support/test_environment.rb b/rb/spec/selenium/webdriver/support/test_environment.rb index 4a74da2924651..c33c056f51361 100644 --- a/rb/spec/selenium/webdriver/support/test_environment.rb +++ b/rb/spec/selenium/webdriver/support/test_environment.rb @@ -6,7 +6,7 @@ class TestEnvironment attr_accessor :unguarded def initialize - puts "creating #{self.class} :: #{RUBY_DESCRIPTION}" + puts "creating test env :: #{RUBY_DESCRIPTION}" end def driver