From: Kenichi Kamiya Date: 2012-02-29T11:58:57+09:00 Subject: Re: Script RC on Windows 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. -- Posted via http://www.ruby-forum.com/.