summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-04 13:37:17 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-04 13:37:17 +0000
commitce6be57ae0252f9b1dc4c8d0db39c5559576363b (patch)
treeea97a0b7a90c8b31a156ca6f6b6ab30e26c99988
parent15c15c06c15141475f54afa19d7b73d59a6c6f9b (diff)
merges r20103 from trunk into ruby_1_9_1.
* array.c (rb_ary_join): do not repeat self in a recursive array. [ruby-dev:37019] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@20111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--array.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 6453a4b3ae..e541552610 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Nov 4 03:28:31 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * 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@ruby-lang.org>
* include/ruby/intern.h (rb_mutex_synchronize): fixed prototype.
diff --git a/array.c b/array.c
index 2f5a194e85..5553b8ff2f 100644
--- a/array.c
+++ b/array.c
@@ -1487,7 +1487,10 @@ rb_ary_join(VALUE ary, VALUE sep)
case T_STRING:
break;
case T_ARRAY:
- {
+ if (tmp == ary) {
+ tmp = rb_usascii_str_new2("[...]");
+ }
+ else {
VALUE args[2];
args[0] = tmp;