* 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
This commit is contained in:
akr 2008-08-20 09:43:24 +00:00
Родитель a5c0ee40b1
Коммит 76a3923c99
2 изменённых файлов: 6 добавлений и 5 удалений

Просмотреть файл

@ -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.

5
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;
}
}