summaryrefslogtreecommitdiff
path: root/ext/win32ole/win32ole_typelib.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-25 00:43:06 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-25 00:43:06 +0000
commit898fd2ed2ad13d8c18b6a96304a8ea75ffd96b59 (patch)
treead0439504e7fe51616e9757a28e869edca248a87 /ext/win32ole/win32ole_typelib.c
parent94bdb010f6375e4df6b7f19e4e6f277d56131452 (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/win32ole/win32ole_typelib.c')
-rw-r--r--ext/win32ole/win32ole_typelib.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/win32ole/win32ole_typelib.c b/ext/win32ole/win32ole_typelib.c
index 5a431d8..4f2c42f 100644
--- a/ext/win32ole/win32ole_typelib.c
+++ b/ext/win32ole/win32ole_typelib.c
@@ -399,9 +399,7 @@ foletypelib_initialize(VALUE self, VALUE args)
HRESULT hr = S_OK;
len = RARRAY_LEN(args);
- if (len < 1 || len > 3) {
- rb_raise(rb_eArgError, "wrong number of arguments (%d for 1..3)", len);
- }
+ rb_check_arity(len, 1, 3);
typelib = rb_ary_entry(args, 0);