Skip to content

Commit

Permalink
system with keyword argument works in recent JRuby
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Mar 29, 2024
1 parent cf2e6ff commit 376c766
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 5 additions & 1 deletion test/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class TaskManager
include Rake::TaskManager
end

RUBY = File.realpath(ENV["RUBY"] || Gem.ruby)
RUBY = (ENV["RUBY"] || Gem.ruby)

def setup
ARGV.clear
Expand Down Expand Up @@ -124,5 +124,9 @@ def jruby9?
jruby? && (JRUBY_VERSION >= "9.0.0.0")
end

def jruby90?
jruby? && JRUBY_VERSION.start_with?("9.0.")
end

include RakefileDefinitions
end
8 changes: 4 additions & 4 deletions test/test_rake_file_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def test_sh_with_multiple_arguments
end

def test_sh_with_spawn_options
omit "JRuby does not support spawn options" if jruby?
omit "JRuby does not support spawn options" if jruby90?

echocommand

Expand Down Expand Up @@ -241,7 +241,7 @@ def test_sh_noop
end

def test_sh_chdir
omit "JRuby does not support spawn options" if jruby?
omit "JRuby does not support spawn options" if jruby90?

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

shellcommand

Expand Down Expand Up @@ -402,7 +402,7 @@ def assert_echoes_fully
end

def test_ruby_with_multiple_arguments
omit if jruby9? # https://github.com/jruby/jruby/issues/3653
omit if jruby90? # https://github.com/jruby/jruby/issues/3653

check_no_expansion

Expand Down

0 comments on commit 376c766

Please sign in to comment.