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

ruby-changes:10168

From: nobu <ko1@a...>
Date: Wed, 21 Jan 2009 14:32:24 +0900 (JST)
Subject: [ruby-changes:10168] Ruby:r21712 (trunk): * parse.y (debug_lines): calls rb_intern() once.

nobu	2009-01-21 14:32:08 +0900 (Wed, 21 Jan 2009)

  New Revision: 21712

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

  Log:
    * parse.y (debug_lines): calls rb_intern() once.

  Modified files:
    trunk/ChangeLog
    trunk/parse.y

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 21711)
+++ ChangeLog	(revision 21712)
@@ -1,3 +1,7 @@
+Wed Jan 21 14:32:02 2009  Nobuyoshi Nakada  <nobu@r...>
+
+	* parse.y (debug_lines): calls rb_intern() once.
+
 Wed Jan 21 13:58:17 2009  Nobuyoshi Nakada  <nobu@r...>
 
 	* include/ruby/io.h (FMODE_EOF): EOF flag on TTY.
Index: parse.y
===================================================================
--- parse.y	(revision 21711)
+++ parse.y	(revision 21712)
@@ -4939,8 +4939,10 @@
 static VALUE
 debug_lines(const char *f)
 {
-    if (rb_const_defined_at(rb_cObject, rb_intern("SCRIPT_LINES__"))) {
-	VALUE hash = rb_const_get_at(rb_cObject, rb_intern("SCRIPT_LINES__"));
+    ID script_lines;
+    CONST_ID(script_lines, "SCRIPT_LINES__");
+    if (rb_const_defined_at(rb_cObject, script_lines)) {
+	VALUE hash = rb_const_get_at(rb_cObject, script_lines);
 	if (TYPE(hash) == T_HASH) {
 	    VALUE fname = rb_str_new2(f);
 	    VALUE lines = rb_ary_new();

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

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