On May 7, 2005, at 6:49 PM, Ryan Leavengood wrote:

> James Edward Gray II wrote:
>
>>
>> I have a question about this solution.  You're stopping when you  
>> see  a carriage-return above, but what does Windows really tact  
>> onto the  end of the line?
>>
>
> Nothing, by using getch I get every character and DOS/Windows  
> doesn't do anything. That is why I put that extra puts there.  
> Otherwise the result looks like this:
>
> Please give me your password: Got 'ryan'

Thanks.

> I'm starting to think you will see the same behavior on Unix and Mac.

Na, Unix uses line feeds:

$ ruby -e 'p gets[-1]'
This will be a line feed =>
10

James Edward Gray II