summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
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 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;