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

ruby-changes:8568

From: nobu <ko1@a...>
Date: Tue, 4 Nov 2008 03:29:01 +0900 (JST)
Subject: [ruby-changes:8568] Ruby:r20103 (trunk, ruby_1_8): * array.c (rb_ary_join): do not repeat self in a recursive array.

nobu	2008-11-04 03:28:34 +0900 (Tue, 04 Nov 2008)

  New Revision: 20103

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

  Log:
    * array.c (rb_ary_join): do not repeat self in a recursive array.
      [ruby-dev:37019]

  Modified files:
    branches/ruby_1_8/ChangeLog
    branches/ruby_1_8/array.c
    branches/ruby_1_8/version.h
    trunk/ChangeLog
    trunk/array.c

Index: array.c
===================================================================
--- array.c	(revision 20102)
+++ array.c	(revision 20103)
@@ -1487,7 +1487,10 @@
 	  case T_STRING:
 	    break;
 	  case T_ARRAY:
-	    {
+	    if (tmp == ary) {
+		tmp = rb_usascii_str_new2("[...]");
+	    }
+	    else {
 		VALUE args[2];
 
 		args[0] = tmp;
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 20102)
+++ ChangeLog	(revision 20103)
@@ -1,3 +1,8 @@
+Tue Nov  4 03:28:31 2008  Nobuyoshi Nakada  <nobu@r...>
+
+	* array.c (rb_ary_join): do not repeat self in a recursive array.
+	  [ruby-dev:37019]
+
 Tue Nov  4 01:56:46 2008  Nobuyoshi Nakada  <nobu@r...>
 
 	* include/ruby/intern.h (rb_mutex_synchronize): fixed prototype.
Index: ruby_1_8/array.c
===================================================================
--- ruby_1_8/array.c	(revision 20102)
+++ ruby_1_8/array.c	(revision 20103)
@@ -1405,7 +1405,7 @@
 	  case T_STRING:
 	    break;
 	  case T_ARRAY:
-	    if (rb_inspecting_p(tmp)) {
+	    if (tmp == ary || rb_inspecting_p(tmp)) {
 		tmp = rb_str_new2("[...]");
 	    }
 	    else {
Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog	(revision 20102)
+++ ruby_1_8/ChangeLog	(revision 20103)
@@ -1,3 +1,8 @@
+Tue Nov  4 03:28:31 2008  Nobuyoshi Nakada  <nobu@r...>
+
+	* array.c (rb_ary_join): do not repeat self in a recursive array.
+	  [ruby-dev:37019]
+
 Mon Nov  3 16:32:54 2008  Nobuyoshi Nakada  <nobu@r...>
 
 	* missing.h: needs RUBY_EXTERN instead of extern for mswin.
Index: ruby_1_8/version.h
===================================================================
--- ruby_1_8/version.h	(revision 20102)
+++ ruby_1_8/version.h	(revision 20103)
@@ -1,7 +1,7 @@
 #define RUBY_VERSION "1.8.7"
-#define RUBY_RELEASE_DATE "2008-11-03"
+#define RUBY_RELEASE_DATE "2008-11-04"
 #define RUBY_VERSION_CODE 187
-#define RUBY_RELEASE_CODE 20081103
+#define RUBY_RELEASE_CODE 20081104
 #define RUBY_PATCHLEVEL 5000
 
 #define RUBY_VERSION_MAJOR 1
@@ -9,7 +9,7 @@
 #define RUBY_VERSION_TEENY 7
 #define RUBY_RELEASE_YEAR 2008
 #define RUBY_RELEASE_MONTH 11
-#define RUBY_RELEASE_DAY 3
+#define RUBY_RELEASE_DAY 4
 
 #ifdef RUBY_EXTERN
 RUBY_EXTERN const char ruby_version[];

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

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