summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-20 09:43:24 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-08-20 09:43:24 +0000
commit605fd936f5f808d50b6a48e028a0313b3f3c3962 (patch)
tree08c3a232bfbd282a50171080a2fb3938b783d034
parent86d252a1321e5ff7d7cf5c5be34739a8de63de3a (diff)
downloadruby-605fd936f5f808d50b6a48e028a0313b3f3c3962.tar.gz
ruby-605fd936f5f808d50b6a48e028a0313b3f3c3962.tar.xz
ruby-605fd936f5f808d50b6a48e028a0313b3f3c3962.zip
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@18722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--io.c5
2 files changed, 6 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 829aa472a..3b05daef6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Wed Aug 20 18:41:11 2008 Tanaka Akira <akr@fsij.org>
+
+ * 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 <akr@fsij.org>
* io.c (open_key_args): meaningless MEMCPY removed.
diff --git a/io.c b/io.c
index 3f67d8093..f2c78397c 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;
}
}