[#3006] mismatched quotation — "stevan apter" <apter@...>

ruby documentation uses a punctuation convention i've never seen

13 messages 2000/05/27

[ruby-talk:02990] Problem with getc under UNIX with ruby 1.4.3

From: "David Douthitt" <DDouthitt@...>
Date: 2000-05-25 20:40:36 UTC
List: ruby-talk #2990
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?



In This Thread

Prev Next