On Tuesday 07 July 2009 13:23:51 Brian Candler wrote:
> while str = STDIN.gets
>   str.chomp!
>   puts "String: #{str}"
> end

Which can also be written as:
STDIN.each_line do |str|
  ...
end