aboutsummaryrefslogtreecommitdiffstats
path: root/struct.c
diff options
context:
space:
mode:
Diffstat (limited to 'struct.c')
-rw-r--r--struct.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/struct.c b/struct.c
index 21f8c1ab7b..f3dd085927 100644
--- a/struct.c
+++ b/struct.c
@@ -776,9 +776,7 @@ rb_struct_select(int argc, VALUE *argv, VALUE s)
VALUE result;
long i;
- if (argc > 0) {
- rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)", argc);
- }
+ rb_check_arity(argc, 0, 0);
RETURN_ENUMERATOR(s, 0, 0);
result = rb_ary_new();
for (i = 0; i < RSTRUCT_LEN(s); i++) {