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

ruby-changes:35722

From: nobu <ko1@a...>
Date: Mon, 6 Oct 2014 00:31:53 +0900 (JST)
Subject: [ruby-changes:35722] nobu:r47804 (trunk): io.c: ID instead of Symbol

nobu	2014-10-06 00:31:38 +0900 (Mon, 06 Oct 2014)

  New Revision: 47804

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

  Log:
    io.c: ID instead of Symbol
    
    * io.c (get_kwargs_exception): rb_get_kwargs() expects IDs, but
      not Symbols.

  Modified files:
    trunk/io.c
Index: io.c
===================================================================
--- io.c	(revision 47803)
+++ io.c	(revision 47804)
@@ -169,9 +169,9 @@ VALUE rb_default_rs; https://github.com/ruby/ruby/blob/trunk/io.c#L169
 
 static VALUE argf;
 
-static ID id_write, id_read, id_getc, id_flush, id_readpartial, id_set_encoding;
+static ID id_write, id_read, id_getc, id_flush, id_readpartial, id_set_encoding, id_exception;
 static VALUE sym_mode, sym_perm, sym_extenc, sym_intenc, sym_encoding, sym_open_args;
-static VALUE sym_textmode, sym_binmode, sym_autoclose, sym_exception;
+static VALUE sym_textmode, sym_binmode, sym_autoclose;
 static VALUE sym_SET, sym_CUR, sym_END;
 #ifdef SEEK_DATA
 static VALUE sym_DATA;
@@ -2633,7 +2633,7 @@ get_kwargs_exception(VALUE opts) https://github.com/ruby/ruby/blob/trunk/io.c#L2633
     VALUE except;
 
     if (!ids[0])
-	ids[0] = sym_exception;
+	ids[0] = id_exception;
 
     rb_get_kwargs(opts, ids, 0, 1, &except);
     return except;
@@ -12379,5 +12379,5 @@ Init_IO(void) https://github.com/ruby/ruby/blob/trunk/io.c#L12379
 #ifdef SEEK_HOLE
     sym_HOLE = ID2SYM(rb_intern("HOLE"));
 #endif
-    sym_exception = ID2SYM(rb_intern("exception"));
+    id_exception = rb_intern("exception");
 }

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

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