diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-15 09:54:36 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-15 09:54:36 +0000 |
commit | c6cb57262d244a1e888807d9e85eed57bb447558 (patch) | |
tree | e0225458f841f83218176c9427410a990e31ae15 | |
parent | 50e7cb3b38bb703c1b6abf00c38dddeeac4e21da (diff) | |
download | ruby-c6cb57262d244a1e888807d9e85eed57bb447558.tar.gz |
* io.c (argf_each_line): should return self. [ruby-core:23852]
* io.c (argf_each_byte, argf_each_char): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | io.c | 7 |
2 files changed, 9 insertions, 4 deletions
@@ -1,3 +1,9 @@ +Mon Jun 15 18:48:41 2009 Yukihiro Matsumoto <matz@ruby-lang.org> + + * io.c (argf_each_line): should return self. [ruby-core:23852] + + * io.c (argf_each_byte, argf_each_char): ditto. + Mon Jun 15 17:48:42 2009 Yukihiro Matsumoto <matz@ruby-lang.org> * gc.c (os_obj_of): invoke garbage collection before iteration, to @@ -8406,11 +8406,10 @@ argf_each_line(int argc, VALUE *argv, VALUE argf) { RETURN_ENUMERATOR(argf, argc, argv); for (;;) { - if (!next_argv()) return Qnil; + if (!next_argv()) return argf; rb_block_call(ARGF.current_file, rb_intern("each_line"), argc, argv, rb_yield, 0); ARGF.next_p = 1; } - return argf; } static VALUE @@ -8418,7 +8417,7 @@ argf_each_byte(VALUE argf) { RETURN_ENUMERATOR(argf, 0, 0); for (;;) { - if (!next_argv()) return Qnil; + if (!next_argv()) return argf; rb_block_call(ARGF.current_file, rb_intern("each_byte"), 0, 0, rb_yield, 0); ARGF.next_p = 1; } @@ -8429,7 +8428,7 @@ argf_each_char(VALUE argf) { RETURN_ENUMERATOR(argf, 0, 0); for (;;) { - if (!next_argv()) return Qnil; + if (!next_argv()) return argf; rb_block_call(ARGF.current_file, rb_intern("each_char"), 0, 0, rb_yield, 0); ARGF.next_p = 1; } |