From bf70582cf30ae6f715769c519f451411f5d2a577 Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 23 Feb 2000 05:23:12 +0000 Subject: 2000-02-23 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- array.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'array.c') diff --git a/array.c b/array.c index 7172baaa8d..56957e3aac 100644 --- a/array.c +++ b/array.c @@ -669,7 +669,7 @@ rb_ary_join(ary, sep) VALUE ary, sep; { long i; - int taint; + int taint = 0; VALUE result, tmp; if (RARRAY(ary)->len == 0) return rb_str_new(0, 0); @@ -823,6 +823,7 @@ static VALUE inspect_ary(ary) VALUE ary; { + int tainted = OBJ_TAINTED(ary); long i = 0; VALUE s, str; @@ -830,11 +831,13 @@ inspect_ary(ary) for (i=0; ilen; 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); } rb_str_cat(str, "]", 1); + if (tainted) OBJ_TAINT(str); return str; } -- cgit v1.2.3