From: Run Paint Run Run Date: 2009-07-06T00:31:57+09:00 Subject: [ruby-core:24152] [Bug #1732] Inconsistency in Transference of Inherited Traits ('Tainted' and 'Untrusted') with #join Bug #1732: Inconsistency in Transference of Inherited Traits ('Tainted' and 'Untrusted') with #join http://redmine.ruby-lang.org/issues/show/1732 Author: Run Paint Run Run Status: Open, Priority: Normal Category: core ruby -v: ruby 1.9.2dev (2009-07-05 trunk 23958) [i686-linux] Array#join transfers self's taintedness and trustworthiness to its return value. If an Array is tainted, so is the concatenation of its elements: >> ['a'].taint.join.tainted? => true >> ['a'].untrust.join.untrusted? => true However, other Enumerables with #join methods do not pass said traits to their offspring: >> {'a' => 'b'}.taint.join.tainted? => false >> {'a' => 'b'}.untrust.join.untrusted? => false >> require 'set' => true >> Set.new(['a','b']).taint.join.tainted? => false >> Set.new(['a','b']).untrust.join.untrusted? => false >> class E; include Enumerable; def initialize(*a); @e=a; end; def each; @e.each{|e| yield e}; end; end => nil >> E.new('a','b').taint.join.tainted? => false >> E.new('a','b').untrust.join.untrusted? => false ---------------------------------------- http://redmine.ruby-lang.org