From: Mathieu Bouchard Date: 2001-04-06T14:22:50+09:00 Subject: [ruby-talk:13526] Re: BUG?: HP-UX 10.20 and IO#gets followed by IO#puts On Thu, 5 Apr 2001, Dave Thomas wrote: > ts writes: > > >>>>> "S" == SHULTZ,BARRY (HP-Israel,ex1) writes: > > S> If it's normal, though, why are the results different on HP-UX and NT? > > Does NT follow a standard ? :-) > > In this case though Ruby is abstracting the underlying calls, so I'd > hope for identical output on the two systems. Well, if Ruby abstracts the underlying calls such that the Ruby's IO contract is basically the same as POSIX's IO contract, and if POSIX says a certain sequence of operations (eg: a read followed immediately by a write) is undefined, then it does not matter whether two systems behave differently when you do that, because you aren't supposed to do that in the first place. Now whether we want Ruby IO to follow POSIX semantics is a good question. Btw, if you want Ruby to have its own buffering, that's what I started doing in MetaRuby's IOMixin, but I didn't finish it. The reason I'm doing it in the first place is that I can't rely on buffering because it only works on real filehandles. matju