From: matz@... (Yukihiro Matsumoto) Date: 2000-01-26T02:01:52+09:00 Subject: [ruby-talk:01185] Re: removing tainting In message "[ruby-talk:01183] removing tainting" on 00/01/25, Dave Thomas writes: |Should the following sequence remove tainting? | | s = "hello".taint | t = s.to_a[0] | p s.tainted? | p t.tainted? Oops, it's a bug. String#each_line should propagate tainting. --- string.c~ Mon Jan 17 17:24:12 2000 +++ string.c Wed Jan 26 01:53:49 2000 @@ -2190,6 +2209,7 @@ if (s != pend) { if (p > pend) p = pend; line = rb_str_new(s, p - s); + OBJ_INFECT(line, str); rb_yield(line); }