diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-25 00:43:06 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-25 00:43:06 +0000 |
commit | 898fd2ed2ad13d8c18b6a96304a8ea75ffd96b59 (patch) | |
tree | ad0439504e7fe51616e9757a28e869edca248a87 /ext/zlib | |
parent | 94bdb010f6375e4df6b7f19e4e6f277d56131452 (diff) |
use rb_check_arity [ci skip]
* ext: use rb_check_arity and rb_error_arity to raise
ArgumentError. [Feature #9025]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/zlib')
-rw-r--r-- | ext/zlib/zlib.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index d5a18ddd63..8cec7fbc33 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -3097,9 +3097,7 @@ gzfile_s_open(int argc, VALUE *argv, VALUE klass, const char *mode) { VALUE io, filename; - if (argc < 1) { - rb_raise(rb_eArgError, "wrong number of arguments (0 for 1)"); - } + rb_check_arity(argc, 1, UNLIMITED_ARGUMENTS); filename = argv[0]; io = rb_file_open_str(filename, mode); argv[0] = io; |