readlines changed from 1.8.0 to 1.8.1?

  • Thread starter Joel VanderWerf
  • Start date
J

Joel VanderWerf

$ 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.
 
M

Matt Armstrong

Joel VanderWerf said:
$ 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,796
Messages
2,569,645
Members
45,362
Latest member
OrderTrimKetoBoost

Latest Threads

Top