diff options
author | ojab <ojab@ojab.ru> | 2016-07-16 13:51:40 +0000 |
---|---|---|
committer | ojab <ojab@ojab.ru> | 2016-07-16 16:14:57 +0000 |
commit | 550ba8a9de526bb56a853ddb3eef3bc003bd94a0 (patch) | |
tree | db2562c1c861ff1632ab94375a96acc81ccfdfcc /lib | |
parent | 5077d5eaf2acf96164f0fbd1d1b6dfb0a132b853 (diff) | |
download | bundler-550ba8a9de526bb56a853ddb3eef3bc003bd94a0.tar.gz |
JRuby in 1.8 mode doesn't support Array as first argument for Kernel.exec
Fixes #4586
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bundler/cli/exec.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/bundler/cli/exec.rb b/lib/bundler/cli/exec.rb index f8cd35b1..f0ce4509 100644 --- a/lib/bundler/cli/exec.rb +++ b/lib/bundler/cli/exec.rb @@ -25,7 +25,11 @@ module Bundler if bin_path = Bundler.which(cmd) return kernel_load(bin_path, *args) if ruby_shebang?(bin_path) # First, try to exec directly to something in PATH - kernel_exec([bin_path, cmd], *args) + if Bundler.current_ruby.jruby_18? + kernel_exec(bin_path, *args) + else + kernel_exec([bin_path, cmd], *args) + end else # exec using the given command kernel_exec(cmd, *args) |