From: Eric Christopherson Date: 2012-02-29T12:11:33+09:00 Subject: Re: Script RC on Windows On Tue, Feb 28, 2012 at 8:58 PM, Kenichi Kamiya wrote: > Hi George, > > > You mean like this? >    ruby example.rb stdout > > Your code finished on my Windows(XP) too. > But, RC was 0. > I tested. >  * ruby 1.9.3p125 (2012-02-16) [i386-mingw32] >  * ruby 1.8.7 (2012-02-08 patchlevel 358) [i386-mingw32] > > Please write full of your commands. > I guess, your command is below. >    ruby example.rb stdout & echo %ERRORLEVEL% > > This is not same with below command on BourneShell. >    ruby example.rb stdout; echo $? > > Try this. >    ruby example.rb stdout >    echo %ERRORLEVEL% > > This problem from "cmd.exe". > (solved in "cmd.exe /v:on" and "setlocal enabledelayedexpansion") > > And your code is able to change below, in this case.(better for me) > >    STDIN.each do |line| >      print line.upcase >    end > > or > >    while line = STDIN.gets >      print line.upcase >    end > > "Kernel#gets" connect to "ARGF" that is STDIN and more. Kenichi, I keep seeing your messages here, but I never know what you're responding to. Please quote at least part of the original messages.