The was running correctly:
C:\>ruby -00 -e 'a= gets; puts a ;puts "here is: #{$/.inspect}"'
Hi #[pressed ENTER]
[pressed ENTER]
Hi # <~~ here Hi came as the output, as expected.
here is: "\n\n" #<~~ here Hi came as the output, as expected.
C:\>
But I was surprised when this happens on my Ubuntu machine:
@ubuntu:~$ ruby -00 -e 'a= gets; puts a ;puts "here is: #{$/.inspect}"'
> hi # [pressed ENTER]
> [pressed ENTER]
> hi #[pressed ENTER]
> ^C
@ubuntu:~$
Any suggestions what to do to make it work in Ubuntu also?