From: Curt Hibbs Date: 2005-11-17T03:22:20+09:00 Subject: Re: interactive shell on windows ------=_Part_7679_26187208.1132165337026 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 11/16/05, py wrote: > > Matthew Desmarais wrote: > > No kidding! Where did it say that? > > Well for the One-Click installer for Windows, version 1.8.2-15 includes > ProgrammingRuby.chm (under the ruby directory). > > In that help file look under Preface/Running Ruby/Interactive Ruby > ....copied/pasted below... > > [excerpt] > "Interactive Ruby > > The easiest way to run Ruby interactively is simply to type ``ruby'' at > the shell prompt. > > % ruby > puts "Hello, world!" > ^D > Hello, world! > [/excerpt] > > See :) I see what's going on here. Ruby with no args reads from the standard input (in this case the terminal) and runs whatever it gets as soon as the input stream terminates, which is the "^D", and not your enter key. If you were t= o use this technique, you would have to tye "ruby" again to execute something else. IRB executes and the enter key and then waits for another line to execute. This is, obviously, much more convenient! :-) Curt ------=_Part_7679_26187208.1132165337026--