summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-04-10 05:48:43 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-04-10 05:48:43 +0000
commit7194267b3bdf68ad75bd6bee8e7c6377f7b0ea2f (patch)
tree6dcd08ef584fc777cf34517136d5ce3948840e45 /array.c
parentbe72d9a5da9be284d2bdb8047e50f14e014b7835 (diff)
2000-04-10
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r--array.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/array.c b/array.c
index f8c2b2e030..f4c3a33752 100644
--- a/array.c
+++ b/array.c
@@ -728,8 +728,8 @@ rb_ary_join(ary, sep)
default:
tmp = rb_obj_as_string(tmp);
}
- if (!NIL_P(sep)) rb_str_concat(result, sep);
- rb_str_cat(result, RSTRING(tmp)->ptr, RSTRING(tmp)->len);
+ if (!NIL_P(sep)) rb_str_append(result, sep);
+ rb_str_append(result, tmp);
if (OBJ_TAINTED(tmp)) taint = 1;
}
@@ -841,8 +841,8 @@ inspect_ary(ary)
for (i=0; i<RARRAY(ary)->len; i++) {
s = rb_inspect(RARRAY(ary)->ptr[i]);
tainted = OBJ_TAINTED(s);
- if (i > 0) rb_str_cat(str, ", ", 2);
- rb_str_cat(str, RSTRING(s)->ptr, RSTRING(s)->len);
+ if (i > 0) rb_str_cat2(str, ", ");
+ rb_str_append(str, s);
}
rb_str_cat(str, "]", 1);