From ce6be57ae0252f9b1dc4c8d0db39c5559576363b Mon Sep 17 00:00:00 2001 From: yugui Date: Tue, 4 Nov 2008 13:37:17 +0000 Subject: 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 --- array.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'array.c') 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; -- cgit v1.2.3