diff --git a/lib/foreman.rb b/lib/foreman.rb index 888247a..6f81674 100644 --- a/lib/foreman.rb +++ b/lib/foreman.rb @@ -8,8 +8,8 @@ module Foreman File.expand_path("../../bin/foreman-runner", __FILE__) end - def self.jruby? - defined?(RUBY_PLATFORM) and RUBY_PLATFORM == "java" + def self.jruby_18? + defined?(RUBY_PLATFORM) and RUBY_PLATFORM == "java" and ruby_18? end def self.ruby_18? diff --git a/lib/foreman/process.rb b/lib/foreman/process.rb index 6ea3893..4069ed9 100644 --- a/lib/foreman/process.rb +++ b/lib/foreman/process.rb @@ -53,7 +53,7 @@ class Foreman::Process Dir.chdir(cwd) do Process.spawn env, expanded_command(env), :out => output, :err => output end - elsif Foreman.jruby? + elsif Foreman.jruby_18? require "posix/spawn" wrapped_command = "#{Foreman.runner} -d '#{cwd}' -p -- #{command}" POSIX::Spawn.spawn env, wrapped_command, :out => output, :err => output