Ruby Issue Tracking System: Issues
https://bugs.ruby-lang.org/
https://bugs.ruby-lang.org/favicon.ico?1711330511
2011-11-08T18:00:11Z
Ruby Issue Tracking System
Redmine
Ruby master - Bug #5591 (Closed): Windows bug when using "shortcut" syntax with output redirection
https://bugs.ruby-lang.org/issues/5591
2011-11-08T18:00:11Z
jwille (Jens Wille)
ww@blackwinter.de
<p>How to reproduce:</p>
<p>---- snip ----</p>
<a name="testrb"></a>
<h1 >test.rb<a href="#testrb" class="wiki-anchor">¶</a></h1>
<p>puts test<br>
---- snip ----</p>
<p>Start Command Prompt with Ruby 1.9.3:</p>
<p>$ ruby test.rb<br>
test<br>
$ ruby test.rb > out<br>
$ type out<br>
test<br>
$ test<br>
test<br>
$ test > out<br>
[BUG] rb_update_max_fd: invalid fd (1) given.<br>
ruby 1.9.3p0 (2011-10-30) [i386-mingw32]</p>
<p>-- Control frame information -----------------------------------------------<br>
c:0001 p:---- s:0002 b:0002 l:000001 d:000001 TOP</p>
<p>-- C level backtrace information -------------------------------------------<br>
C:\WINDOWS\system32\ntdll.dll(KiIntSystemCall+0x6) [0x7c91e526]<br>
C:\WINDOWS\system32\kernel32.dll(WaitForSingleObject+0x12) [0x7c802542]<br>
C:\Ruby193\bin\msvcrt-ruby191.dll(rb_vm_bugreport+0xf9) [0x62e5acc9]<br>
C:\Ruby193\bin\msvcrt-ruby191.dll(rb_name_err_mesg_new+0x17a) [0x62d3a68e]<br>
C:\Ruby193\bin\msvcrt-ruby191.dll(rb_bug+0x2f) [0x62d3b3ef]<br>
C:\Ruby193\bin\msvcrt-ruby191.dll(rb_io_close+0x357) [0x62d63ab7]<br>
C:\Ruby193\bin\msvcrt-ruby191.dll(rb_get_argv+0x1123) [0x62d70b9b]<br>
C:\Ruby193\bin\msvcrt-ruby191.dll(rb_call_inits+0x83) [0x62d5e807]<br>
C:\Ruby193\bin\msvcrt-ruby191.dll(ruby_init+0x89) [0x62d41a8d]<br>
[0x00401355]<br>
[0x004010b9]<br>
[0x00401284]</p>
<p>-- Other runtime information -----------------------------------------------</p>
<p>0: can't convert false into String (TypeError)<br>
$</p>
<p>Expected <code>test > out' to behave like </code>ruby test.rb > out'.</p>
<p>Bug occurs with both 1.9.3 (RubyInstaller) and 1.9.2 (Binary); 1.8.7 (RubyInstaller) behaves as expected. Tested on Windows XP Version 2002 Service Pack 3; originally reported on Windows 7.</p>