summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorojab <ojab@ojab.ru>2016-07-16 13:51:40 +0000
committerojab <ojab@ojab.ru>2016-07-16 16:14:57 +0000
commit550ba8a9de526bb56a853ddb3eef3bc003bd94a0 (patch)
treedb2562c1c861ff1632ab94375a96acc81ccfdfcc
parent5077d5eaf2acf96164f0fbd1d1b6dfb0a132b853 (diff)
downloadbundler-550ba8a9de526bb56a853ddb3eef3bc003bd94a0.tar.gz
JRuby in 1.8 mode doesn't support Array as first argument for Kernel.exec
Fixes #4586
-rw-r--r--lib/bundler/cli/exec.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/bundler/cli/exec.rb b/lib/bundler/cli/exec.rb
index f8cd35b140..f0ce450959 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)