----- Original Message ----- 
From: John C. <button_delete / thomases.com>
Newsgroups: comp.lang.ruby
To: ruby-talk ML <ruby-talk / ruby-lang.org>; <undisclosed-recipients: ;>
Sent: Sunday, December 23, 2001 12:37 AM
Subject: [ruby-talk:29346] Simple Console IO question


> I am in the process of attempting to learn Ruby (again)
> and have a question that I could not find an answer to in the
> Pickaxe book (1st edition).
> 
> Page 107 gives a simple example:
> 
> print "enter your name: "
> name = gets
> 
> My question is this: When running this, the cursor moves to
> the next line for input. How do I keep it on the same line
> as the printed "enter your name: " so that it looks like:
> 
> Enter your name: _
> 
> instead of:
> 
> Enter your name:
> _
> 
> 
> I played around with a few def statements and read about half
> the book, but I couldn't solve this on my own.

That's odd, because as you've written it, it 
should behave as you want (cursor at end of
first line).

It's always done that for me, both Unix and Windows.

Are you running in irb or something?

Hal