diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-20 14:46:03 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-20 14:46:03 +0000 |
commit | 009debfd02f5024b85b5c325f42533b40f4028e9 (patch) | |
tree | 96debc8921156294506ca37d58f1ef7b7719ca94 /io.c | |
parent | 5d51ae926b39781fa99c9462d761e2dd5649f2da (diff) | |
download | ruby-009debfd02f5024b85b5c325f42533b40f4028e9.tar.gz |
* io.c (rb_io_s_foreach): argument count check before making
Enumerator. [ruby-dev:31525]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -5185,8 +5185,8 @@ rb_io_s_foreach(int argc, VALUE *argv, VALUE self) VALUE fname; struct foreach_arg arg; - RETURN_ENUMERATOR(self, argc, argv); rb_scan_args(argc, argv, "12", &fname, NULL, NULL); + RETURN_ENUMERATOR(self, argc, argv); FilePathValue(fname); arg.io = rb_io_open(RSTRING_PTR(fname), "r"); if (NIL_P(arg.io)) return Qnil; |