Michael Linfield wrote:
> 
>> 
>> while true
>>    info = gets.chomp
>>    if info != nil
>>        puts info
>>    end
>> end
>> 
>> actually doesn't outputs a thing..
> 
> lol. i didnt mean for it to be used in a while loop.

And i actually just got home and tested that while loop, it works...ur 
not doing this in IRB right?

testprog.rb
>> while true
>>    info = gets.chomp
>>    if info != nil
>>        puts info
>>    end
>> end

ruby testprog.rb

output:
h
h
i
i
p
p
#whatever letter you enter it will respond with that letter that you 
entered.
-- 
Posted via http://www.ruby-forum.com/.