diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-11-03 18:28:34 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-11-03 18:28:34 +0000 |
commit | 4927a7c77a3444f3e0e9e6ff9751c75e3ee517ac (patch) | |
tree | 77b7e2df98396eef2aba1ffb6f448a000f9ec060 /array.c | |
parent | 88a4f331219ae0cb25afb70f2c32c8c000aba750 (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.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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; |