Pawel Radecki wrote:
> 
> #!/usr/bin/env ruby
> text = ""
> while (line = gets)
>      text+=line
> end
> print text.reverse
> 

Interestingly it seems to work perfectly fine here,

Terry@Dixie$ ruby --version                                               
7:10
ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-freebsd6]
Terry@Dixie$                                                              
7:11