diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-16 12:58:41 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-16 12:58:41 +0000 |
commit | 51fbc0699cb972d6f328b15ddfd2173bb8cebe70 (patch) | |
tree | 0768fe20ab3780ccdd4d0b52d42a545ed07e8505 /ext | |
parent | 82543dbc999091c921cd1ce76ed84ff79e306937 (diff) |
* ext/stringio/stringio.c (strio_each, strio_readlines): IO#each and
IO#readlines do not affect $_. [ruby-core:17277]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/stringio/stringio.c | 2 |
1 files changed, 0 insertions, 2 deletions
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; } |