summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-22 08:07:38 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-22 08:07:38 +0000
commit873b56fd50e12294601bbe96b1bef3b2c2428010 (patch)
treee1d786a4090aab4ea878efa2cd56db93fae132c5 /io.c
parente093cfae7af6304d3ba4427ab27ac6e2d352bf82 (diff)
* io.c (rb_io_s_foreach): return enumerator including kerword
arguments. [ruby-dev:45267][Bug #6054] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io.c b/io.c
index f404b539a4..add37237ab 100644
--- a/io.c
+++ b/io.c
@@ -8971,8 +8971,8 @@ rb_io_s_foreach(int argc, VALUE *argv, VALUE self)
VALUE opt;
struct foreach_arg arg;
- argc = rb_scan_args(argc, argv, "13:", NULL, NULL, NULL, NULL, &opt);
RETURN_ENUMERATOR(self, argc, argv);
+ argc = rb_scan_args(argc, argv, "13:", NULL, NULL, NULL, NULL, &opt);
open_key_args(argc, argv, opt, &arg);
if (NIL_P(arg.io)) return Qnil;
return rb_ensure(io_s_foreach, (VALUE)&arg, rb_io_close, arg.io);