[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

IO#clone and 1.6 -> 1.8 question

dblack

9/9/2003 1:32:00 AM

1 Answer

matz

9/9/2003 3:51:00 AM

0

Hi,

In message "IO#clone and 1.6 -> 1.8 question"
on 03/09/09, dblack@superlink.net <dblack@superlink.net> writes:

|Just tinkering with IO#clone, in connection with some irc
|chatting, and found the following behavior which puzzles
|me. Here''s the test program:

It''s combination of the two:

* file position is shared among IO clones. It''s defined stdio
behavior.

* IO are buffered so that actual file pointer
may advance more than you expected (i.e. entire "num" file was
swallowed this case) by a single "gets".

matz.