From 76a3923c99ed79a52ca4d04c694da079625d4180 Mon Sep 17 00:00:00 2001 From: akr Date: Wed, 20 Aug 2008 09:43:24 +0000 Subject: * 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ io.c | 5 ----- 2 files changed, 6 insertions(+), 5 deletions(-) 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; } } -- cgit v1.2.3