Skip to content

Commit 4e8f7dd

Browse files
nobuhsbt
authored andcommitted
system with keyword argument works in recent JRuby
1 parent ab746d6 commit 4e8f7dd

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

test/helper.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class TaskManager
2929
include Rake::TaskManager
3030
end
3131

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

3434
def setup
3535
ARGV.clear
@@ -122,5 +122,9 @@ def jruby9?
122122
jruby? && (JRUBY_VERSION >= "9.0.0.0")
123123
end
124124

125+
def jruby90?
126+
jruby? && JRUBY_VERSION.start_with?("9.0.")
127+
end
128+
125129
include RakefileDefinitions
126130
end

test/test_rake_file_utils.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def test_sh_with_multiple_arguments
181181
end
182182

183183
def test_sh_with_spawn_options
184-
omit "JRuby does not support spawn options" if jruby?
184+
omit "JRuby does not support spawn options" if jruby90?
185185

186186
echocommand
187187

@@ -240,7 +240,7 @@ def test_sh_noop
240240
end
241241

242242
def test_sh_chdir
243-
omit "JRuby does not support spawn options" if jruby?
243+
omit "JRuby does not support spawn options" if jruby90?
244244

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

261261
shellcommand
262262

@@ -401,7 +401,7 @@ def assert_echoes_fully
401401
end
402402

403403
def test_ruby_with_multiple_arguments
404-
omit if jruby9? # https://github.com/jruby/jruby/issues/3653
404+
omit if jruby90? # https://github.com/jruby/jruby/issues/3653
405405

406406
check_no_expansion
407407

0 commit comments

Comments
 (0)