Skip to content

Commit 024a807

Browse files
committed
system with keyword argument works in recent JRuby
1 parent cf2e6ff commit 024a807

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

test/helper.rb

+5-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class TaskManager
2727
include Rake::TaskManager
2828
end
2929

30-
RUBY = File.realpath(ENV["RUBY"] || Gem.ruby)
30+
RUBY = (ENV["RUBY"] || Gem.ruby)
3131

3232
def setup
3333
ARGV.clear
@@ -124,5 +124,9 @@ def jruby9?
124124
jruby? && (JRUBY_VERSION >= "9.0.0.0")
125125
end
126126

127+
def jruby90?
128+
jruby? && JRUBY_VERSION.start_with?("9.0.")
129+
end
130+
127131
include RakefileDefinitions
128132
end

test/test_rake_file_utils.rb

+5-5
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def test_sh_with_multiple_arguments
182182
end
183183

184184
def test_sh_with_spawn_options
185-
omit "JRuby does not support spawn options" if jruby?
185+
omit "JRuby does not support spawn options" if jruby90?
186186

187187
echocommand
188188

@@ -198,7 +198,7 @@ def test_sh_with_spawn_options
198198
end
199199

200200
def test_sh_with_hash_option
201-
omit "JRuby does not support spawn options" if jruby?
201+
omit "JRuby does not support spawn options" if jruby90?
202202
check_expansion
203203

204204
verbose(false) {
@@ -241,7 +241,7 @@ def test_sh_noop
241241
end
242242

243243
def test_sh_chdir
244-
omit "JRuby does not support spawn options" if jruby?
244+
omit "JRuby does not support spawn options" if jruby90?
245245

246246
Dir.mkdir "chdir_test"
247247
out, err = capture_output do
@@ -257,7 +257,7 @@ def test_sh_chdir
257257
def test_sh_bad_option
258258
# Skip on JRuby because option checking is performed by spawn via system
259259
# now.
260-
omit "JRuby does not support spawn options" if jruby?
260+
omit "JRuby does not support spawn options" if jruby90?
261261

262262
shellcommand
263263

@@ -402,7 +402,7 @@ def assert_echoes_fully
402402
end
403403

404404
def test_ruby_with_multiple_arguments
405-
omit if jruby9? # https://github.com/jruby/jruby/issues/3653
405+
omit if jruby90? # https://github.com/jruby/jruby/issues/3653
406406

407407
check_no_expansion
408408

0 commit comments

Comments
 (0)