diff --git a/ChangeLog b/ChangeLog index 829aa472a3..3b05daef63 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Wed Aug 20 18:41:11 2008 Tanaka Akira + + * io.c (rb_open_file): don't lookup :mode and :perm in opt. it is + useless because vmode and perm is overwritten by rb_scan_args + anyway. + Wed Aug 20 18:37:20 2008 Tanaka Akira * io.c (open_key_args): meaningless MEMCPY removed. diff --git a/io.c b/io.c index 3f67d8093c..f2c78397c9 100644 --- a/io.c +++ b/io.c @@ -4462,11 +4462,6 @@ rb_open_file(int argc, VALUE *argv, VALUE io) if (0 < argc) { opt = rb_check_convert_type(argv[argc-1], T_HASH, "Hash", "to_hash"); if (!NIL_P(opt)) { - VALUE v; - v = rb_hash_aref(opt, sym_mode); - if (!NIL_P(v)) vmode = v; - v = rb_hash_aref(opt, sym_perm); - if (!NIL_P(v)) perm = v; argc -= 1; } }