Skip to content

Commit

Permalink
JRUBY-4042: [windows] jruby.bat without parameters fails
Browse files Browse the repository at this point in the history
Also, added a unit test for this.
  • Loading branch information
vvs committed Oct 4, 2009
1 parent 7a96256 commit 74d9163
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bin/_jrubyvmopts.bat
Expand Up @@ -166,7 +166,13 @@ set _CMP=
goto vmoptsLoop

:vmoptsDone

rem substitute _P only if _RUBY_OPTS is defined,
rem otherwise we'll get an error.
if not defined _RUBY_OPTS goto rubyoptsDone
set _RUBY_OPTS=%_RUBY_OPTS:_P=|%

:rubyoptsDone
set _VM_OPTS=%_VM_OPTS% %_JAVA_VM% %_MEM% %_STK% %_DFLT_VM_OPTS%
set _DFLT_VM_OPTS=
set _MEM=
Expand Down
6 changes: 6 additions & 0 deletions test/test_launching_by_shell_script.rb
Expand Up @@ -14,6 +14,12 @@ def test_launch_script
assert_equal 0, $?.exitstatus
end

# JRUBY-4042
def test_jruby_without_args
jruby_with_pipe("echo puts 1")
assert_equal 0, $?.exitstatus
end

if WINDOWS
def test_system_call_without_stdin_data_doesnt_hang
out = jruby(%q{-e "system 'dir test'"})
Expand Down

0 comments on commit 74d9163

Please sign in to comment.