From: Maung Augn Date: 2007-06-16T03:20:11+09:00 Subject: Re: ruby in cmd Adriano Ferreira wrote: > On 6/15/07, maung wrote: >> I am new to Ruby and am trying to run a piece of code from Programming >> Ruby in cmd. When i run in cmd >ruby Song.rb, I don't get any output. >> But I can get the result I expected when I run in irb. Can anyone help >> me on this? > > As there is no print/puts/etc. statement, this non-output is expected > from the file you wrote when run as a script. > > irb is a read-eval-print loop. By default, it prints the output of the > expressions and that's why you see the output in this case. That's explained it. Thanks a lot. It saved me a lot of time. Maung -- Posted via http://www.ruby-forum.com/.