Readlines changed from 1.8.0 to 1.8.1?

$ cat >foo
bar
$ ruby-1.8.0 -e ‘p IO.readlines(“foo”, nil)’
[“bar\n”]
$ ruby-1.8.1 -e ‘p IO.readlines(“foo”, nil)’
-e:1:in `readlines’: Interrupt from -e:1
$ ruby-1.8.1 -v
ruby 1.8.1 (2003-12-25) [i686-linux]

I had to interrupt the second one.

There’s nothing about readlines in the ChangeLog. What happened?

I know I can use File.read, but I had left IO.readlines in some places
for backwards compatibility.

Joel VanderWerf vjoel@PATH.Berkeley.EDU writes:

$ cat >foo
bar
$ ruby-1.8.0 -e ‘p IO.readlines(“foo”, nil)’
[“bar\n”]
$ ruby-1.8.1 -e ‘p IO.readlines(“foo”, nil)’
-e:1:in `readlines’: Interrupt from -e:1
$ ruby-1.8.1 -v
ruby 1.8.1 (2003-12-25) [i686-linux]

I had to interrupt the second one.

It is a bug that’ll be fixed in future 1.8.x releases (at least, it is
fixed in 1.8 CVS.

···


matt