diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-02-23 05:23:12 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-02-23 05:23:12 +0000 |
commit | bf70582cf30ae6f715769c519f451411f5d2a577 (patch) | |
tree | b3eb8e2975df384946ad70572e1e3387a6c3127c /array.c | |
parent | 6f82a67fd0035fcd2802f1564165d5211bc98ea2 (diff) |
2000-02-23
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r-- | array.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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; 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); } rb_str_cat(str, "]", 1); + if (tainted) OBJ_TAINT(str); return str; } |