diff options
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -323,9 +323,7 @@ rb_hash_initialize(int argc, VALUE *argv, VALUE hash) rb_hash_modify(hash); if (rb_block_given_p()) { - if (argc > 0) { - rb_raise(rb_eArgError, "wrong number of arguments"); - } + rb_check_arity(argc, 0, 0); ifnone = rb_block_proc(); default_proc_arity_check(ifnone); RHASH_IFNONE(hash) = ifnone; |