diff --git a/ChangeLog b/ChangeLog index 643c4ed309..5ba0d01d69 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Jun 16 21:58:38 2008 Nobuyoshi Nakada + + * ext/stringio/stringio.c (strio_each, strio_readlines): IO#each and + IO#readlines do not affect $_. [ruby-core:17277] + Mon Jun 16 18:52:47 2008 Nobuyoshi Nakada * lib/thwait.rb (ThreadsWait): Exception2MessageMapper no longer has diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c index d140ced7e7..b9c7eb7f80 100644 --- a/ext/stringio/stringio.c +++ b/ext/stringio/stringio.c @@ -953,7 +953,6 @@ strio_each(int argc, VALUE *argv, VALUE self) RETURN_ENUMERATOR(self, argc, argv); while (!NIL_P(line = strio_getline(argc, argv, readable(ptr)))) { - rb_lastline_set(line); rb_yield(line); } return self; @@ -975,7 +974,6 @@ strio_readlines(int argc, VALUE *argv, VALUE self) while (!NIL_P(line = strio_getline(argc, argv, readable(ptr)))) { rb_ary_push(ary, line); } - rb_lastline_set(Qnil); return ary; }