From: "David A. Black" Date: 2004-03-01T12:18:35+09:00 Subject: Re: STDIN.pos Hi -- On Mon, 1 Mar 2004 nobu.nokada@softhome.net wrote: > Hi, > > At Mon, 1 Mar 2004 11:46:52 +0900, > David A. Black wrote in [ruby-core:02524]: > > A little change between 1.6.8 and >1.8: > > > > $ /usr/local/src/ruby-1.6.8/ruby -ve 'STDIN.pos' > > ruby 1.6.8 (2002-12-16) [i686-linux] > > $ ruby-1.6 -ve 'p STDIN.pos' > ruby 1.6.8 (2003-10-15) [i686-linux] > -1 > > Does scanf expect negative position? Actually, as I think about it, with STDIN I think pos doesn't matter. (For seekable streams it does, since pos has to be left at the point where the scanf match stops succeeding.) So I think I can do a rescue and set my pos-based variable to a dummy value. Or maybe I should just do that if it's a TTY. David -- David A. Black dblack@wobblini.net