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 | c6f3c196f576e0ebcdfc6fb361bde7056c9731d2 (patch) | |
tree | 77b7e2df98396eef2aba1ffb6f448a000f9ec060 /array.c | |
parent | c0876125f53f71348bf1b83b88cdf20d07a722c0 (diff) | |
download | ruby-c6f3c196f576e0ebcdfc6fb361bde7056c9731d2.tar.gz ruby-c6f3c196f576e0ebcdfc6fb361bde7056c9731d2.tar.xz ruby-c6f3c196f576e0ebcdfc6fb361bde7056c9731d2.zip |
* 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/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; |