summaryrefslogtreecommitdiff
path: root/ext/win32ole/win32ole_variant.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/win32ole/win32ole_variant.c')
-rw-r--r--ext/win32ole/win32ole_variant.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/win32ole/win32ole_variant.c b/ext/win32ole/win32ole_variant.c
index 13a1fcf..f1fdeca 100644
--- a/ext/win32ole/win32ole_variant.c
+++ b/ext/win32ole/win32ole_variant.c
@@ -409,9 +409,7 @@ folevariant_initialize(VALUE self, VALUE args)
struct olevariantdata *pvar;
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);
VariantInit(&var);
val = rb_ary_entry(args, 0);