diff options
Diffstat (limited to 'dir.c')
-rw-r--r-- | dir.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -390,11 +390,10 @@ dir_initialize(int argc, VALUE *argv, VALUE dir) } fsenc = rb_filesystem_encoding(); - rb_scan_args(argc, argv, "11", &dirname, &opt); + argc = rb_scan_args(argc, argv, "1:", &dirname, &opt); if (!NIL_P(opt)) { VALUE v, enc=Qnil; - opt = rb_convert_type(opt, T_HASH, "Hash", "to_hash"); v = rb_hash_aref(opt, sym_enc); if (!NIL_P(v)) enc = v; |