summaryrefslogtreecommitdiffstats
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
commit620b13d8777086b3b4da0e0a07e93b83ea38b66d (patch)
tree6dcd08ef584fc777cf34517136d5ce3948840e45 /array.c
parent0453f53db62f1321492288d1c904aade9bb0fa3e (diff)
downloadruby-620b13d8777086b3b4da0e0a07e93b83ea38b66d.tar.gz
ruby-620b13d8777086b3b4da0e0a07e93b83ea38b66d.tar.xz
ruby-620b13d8777086b3b4da0e0a07e93b83ea38b66d.zip
2000-04-10
git-svn-id: http://svn.ruby-lang.org/repos/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 f8c2b2e03..f4c3a3375 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);