From: Chad Perrin Date: 2008-11-16T05:22:30+09:00 Subject: Re: IO#lineno= doesn't work the way I expected --+QahgC5+KEYLbs62 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 16, 2008 at 04:54:01AM +0900, Michael Guterl wrote: > > > > I would think if it had the behavior you described, the second time > > f.gets is called, we would see: "This is line one thousand and one\n" > > not "This is line two\n" > > > Or maybe even "This is line one thousand\n". I'm not sure... Okay, so . . . 1. What the hell is the point of IO#lineno=3D if it does the same thing as IO#lineno except that it lets you specify a number that doesn't do anything? 2. Is there a way to do what I actually need -- specifically, to iterate over an entire file *except* the first line, only reading one line at a time into RAM -- without writing a C extension for Ruby? --=20 Chad Perrin [ content licensed PDL: http://pdl.apotheon.org ] Quoth Paul Graham: "Object-oriented programming offers a sustainable way to write spaghetti code." --+QahgC5+KEYLbs62 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkkfME8ACgkQ9mn/Pj01uKVqWQCfeLEcjdbAjUdlTTekEZMAK5TG szAAoKBJvJ3yWZRAovdxBVsI5rGCSmLZ =H6QE -----END PGP SIGNATURE----- --+QahgC5+KEYLbs62--