[前][次][番号順一覧][スレッド一覧]

ruby-changes:7203

From: akr <ko1@a...>
Date: Wed, 20 Aug 2008 18:43:40 +0900 (JST)
Subject: [ruby-changes:7203] Ruby:r18722 (trunk): * io.c (rb_open_file): don't lookup :mode and :perm in opt. it is

akr	2008-08-20 18:43:24 +0900 (Wed, 20 Aug 2008)

  New Revision: 18722

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=18722

  Log:
    * 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.

  Modified files:
    trunk/ChangeLog
    trunk/io.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 18721)
+++ ChangeLog	(revision 18722)
@@ -1,3 +1,9 @@
+Wed Aug 20 18:41:11 2008  Tanaka Akira  <akr@f...>
+
+	* 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@f...>
 
 	* io.c (open_key_args): meaningless MEMCPY removed.
Index: io.c
===================================================================
--- io.c	(revision 18721)
+++ io.c	(revision 18722)
@@ -4462,11 +4462,6 @@
     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;
         }
     }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]