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

ruby-changes:4342

From: ko1@a...
Date: Mon, 24 Mar 2008 19:45:46 +0900 (JST)
Subject: [ruby-changes:4342] knu - Ruby:r15832 (ruby_1_8): * parse.y (yycompile): Always prepare a new array for each file's

knu	2008-03-24 19:45:28 +0900 (Mon, 24 Mar 2008)

  New Revision: 15832

  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/parse.y

  Log:
    * parse.y (yycompile): Always prepare a new array for each file's
      SCRIPT_LINES__ storage, instead of appending source lines every
      time a file is re-loaded; submitted by Rocky Bernstein in
      #18517.


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ChangeLog?r1=15832&r2=15831&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/parse.y?r1=15832&r2=15831&diff_format=u

Index: ruby_1_8/parse.y
===================================================================
--- ruby_1_8/parse.y	(revision 15831)
+++ ruby_1_8/parse.y	(revision 15832)
@@ -2601,11 +2601,8 @@
 	hash = rb_const_get(rb_cObject, rb_intern("SCRIPT_LINES__"));
 	if (TYPE(hash) == T_HASH) {
 	    fname = rb_str_new2(f);
-	    ruby_debug_lines = rb_hash_aref(hash, fname);
-	    if (NIL_P(ruby_debug_lines)) {
-		ruby_debug_lines = rb_ary_new();
-		rb_hash_aset(hash, fname, ruby_debug_lines);
-	    }
+	    ruby_debug_lines = rb_ary_new();
+	    rb_hash_aset(hash, fname, ruby_debug_lines);
 	}
 	if (line > 1) {
 	    VALUE str = rb_str_new(0,0);
Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 15831)
+++ ruby_1_8/ChangeLog	(revision 15832)
@@ -1,3 +1,10 @@
+Mon Mar 24 19:44:53 2008  Akinori MUSHA  <knu@i...>
+
+	* parse.y (yycompile): Always prepare a new array for each file's
+	  SCRIPT_LINES__ storage, instead of appending source lines every
+	  time a file is re-loaded; submitted by Rocky Bernstein in
+	  #18517.
+
 Mon Mar 24 10:25:54 2008  Nobuyoshi Nakada  <nobu@r...>
 
 	* configure.in: sitearch should use target_cpu.  [ruby-core:15986]

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

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