summaryrefslogtreecommitdiffstats
path: root/array.c
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
commitde09046e38faef6876e3e9c451aedb771e4af07c (patch)
treeea97a0b7a90c8b31a156ca6f6b6ab30e26c99988 /array.c
parent6207ec185d6ebd0d182a50b6ce27c0bdd16e2320 (diff)
downloadruby-de09046e38faef6876e3e9c451aedb771e4af07c.tar.gz
ruby-de09046e38faef6876e3e9c451aedb771e4af07c.tar.xz
ruby-de09046e38faef6876e3e9c451aedb771e4af07c.zip
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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@20111 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 2f5a194e8..5553b8ff2 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;