summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-03 18:28:34 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-03 18:28:34 +0000
commit4927a7c77a3444f3e0e9e6ff9751c75e3ee517ac (patch)
tree77b7e2df98396eef2aba1ffb6f448a000f9ec060 /array.c
parent88a4f331219ae0cb25afb70f2c32c8c000aba750 (diff)
* 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/trunk@20103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r--array.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/array.c b/array.c
index 237fdd25a1..2e6db452c5 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;