I had an interesting (i.e., unexpected!) thing happen in Ruby today....

Here's the run:

[.....CUT!.....]

# ruby -v
ruby 1.4.3 (1999-12-08) [i586-linux-gnu]
# uname -a
Linux mysys.uhoh.cant.find.me 2.2.9-27mdk #1 Mon Jun 14 16:44:05 CEST 1999 i586 unknown
# ./test.rb
;lakjdf;klasjdf;klasjdf;klasdjf;asdkjf;klasjf
59
# cat test.rb
#!/usr/bin/ruby

str = STDIN.getc
p str

#

[.....CUT!...]

I would have expected output to look like this:

# ./test.rb
59
#

That is - no echo, instant response, no carriage return needed - or put another way, just as if you used "getc" (crunch!).

Can someone straighten me out here?