Doesnt work

Hello i just started learing ruby tonight but the first little code
example from the book doesnt work. It creates a ruby file and when i
click on the ruby file a cmd window opens up and shows me the first line
"Say something, please: " so i write something there and press return
and then the cmd window just shuts every time.

print "Say something, please: "
user_input = gets.chomp
print "You said #{user_input} .\n"
print "Backwards, it reads #{user_input.reverse} .\n"
print "The message is #{user_input.length} characters long.\n"

···

--
Posted via http://www.ruby-forum.com/.

nah it works fine. Add another input statement in there to see. What's happening is the output gets displayed, and the window closes
as soon as the process ends. It's just too fast for you to see.

Start->run "cmd", and then run your ruby script from in there.

Pat

···

On 5/7/06, Corey <0011@hush.com> wrote:

Hello i just started learing ruby tonight but the first little code
example from the book doesnt work. It creates a ruby file and when i
click on the ruby file a cmd window opens up and shows me the first line
"Say something, please: " so i write something there and press return
and then the cmd window just shuts every time.

print "Say something, please: "
user_input = gets.chomp
print "You said #{user_input} .\n"
print "Backwards, it reads #{user_input.reverse} .\n"
print "The message is #{user_input.length} characters long.\n"

--
Posted via http://www.ruby-forum.com/\.

Pat Maddox wrote:

nah it works fine. Add another input statement in there to see.
What's happening is the output gets displayed, and the window closes
as soon as the process ends. It's just too fast for you to see.

Start->run "cmd", and then run your ruby script from in there.

Pat

oh ok thanks alot, that worked. Quick response too i was expecting to
wait lke 24hrs, lol.

Thanks again.

···

--
Posted via http://www.ruby-forum.com/\.

Please note that you are posting through an interface to a mailing
list, ruby-talk (ruby-talk@ruby-lang.org). People get your messages in
their inboxes and respond to you that way. Some people use another
mirror, which is comp.lang.ruby.

-austin

···

On 5/7/06, Corey <0011@hush.com> wrote:

Pat Maddox wrote:
> nah it works fine. Add another input statement in there to see.
> What's happening is the output gets displayed, and the window closes
> as soon as the process ends. It's just too fast for you to see.
>
> Start->run "cmd", and then run your ruby script from in there.
>
> Pat

oh ok thanks alot, that worked. Quick response too i was expecting to
wait lke 24hrs, lol.

--
Austin Ziegler * halostatue@gmail.com
               * Alternate: austin@halostatue.ca

Not any more - or at least not at the moment. The gateway was
switched off AFAIK.

robert

···

2006/5/10, Austin Ziegler <halostatue@gmail.com>:

Please note that you are posting through an interface to a mailing
list, ruby-talk (ruby-talk@ruby-lang.org). People get your messages in
their inboxes and respond to you that way. Some people use another
mirror, which is comp.lang.ruby.

--
Have a look: Robert K. | Flickr