1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
nobu 2008-06-16 12:58:41 +00:00
parent 82543dbc99
commit 51fbc0699c
2 changed files with 5 additions and 2 deletions

View file

@ -1,3 +1,8 @@
Mon Jun 16 21:58:38 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* 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 <nobu@ruby-lang.org>
* lib/thwait.rb (ThreadsWait): Exception2MessageMapper no longer has

View file

@ -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;
}