From: Rob Gu Date: 2011-03-17T07:37:58+09:00 Subject: Re: How to View Output - Stop App Eric Christopherson wrote in post #987808: > On Wed, Mar 16, 2011 at 3:30 PM, Rob Gu wrote: >> Greetings, total noob question I'm sure. I'm trying to run a simple >> example in a console, but how do I tell it to stop so I can view the >> output? In C# I think I could just return false or something, but what >> do you do in Ruby? >> >> puts "Hello, world. What is your name?" >> myname = gets() >> puts "Well, hello there " + myname + "." >> [so here it just closes out, but I want to see the greeting :( ] > > I assume you mean that you double-click on the script's icon, a cmd > window appears, you type in your name, and then the cmd window > disappears. If so, just put 'gets' at the end of the script; that'll > make it wait until you press Enter to close it. Exactly, thank you everyone! (Didn't notice this before my last reply) -- Posted via http://www.ruby-forum.com/.