summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/io.c b/io.c
index 6770b41e1c..ad0b6ffda3 100644
--- a/io.c
+++ b/io.c
@@ -4651,11 +4651,13 @@ io_puts_ary(VALUE ary, VALUE out, int recur)
VALUE tmp;
long i;
+ if (recur) {
+ tmp = rb_str_new2("[...]");
+ rb_io_puts(1, &tmp, out);
+ return Qnil;
+ }
for (i=0; i<RARRAY_LEN(ary); i++) {
tmp = RARRAY_PTR(ary)[i];
- if (recur) {
- tmp = rb_str_new2("[...]");
- }
rb_io_puts(1, &tmp, out);
}
return Qnil;