From: "ko1 (Koichi Sasada)" Date: 2012-07-14T15:55:39+09:00 Subject: [ruby-core:46426] [ruby-trunk - Bug #5902] Array#join with an unused, infected separator may or may not infect the result Issue #5902 has been updated by ko1 (Koichi Sasada). Assignee changed from matz (Yukihiro Matsumoto) to nobu (Nobuyoshi Nakada) ---------------------------------------- Bug #5902: Array#join with an unused, infected separator may or may not infect the result https://bugs.ruby-lang.org/issues/5902#change-28046 Author: john_firebaugh (John Firebaugh) Status: Assigned Priority: Normal Assignee: nobu (Nobuyoshi Nakada) Category: core Target version: ruby -v: ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin10.8.0] =begin It's infected if the separator is unused because there is only one element, but not if there are zero elements. Is this intended behavior? s = [].join(",".taint.untrust) s.tainted? #=> false s.untrusted? #=> false s = [1].join(",".taint.untrust) s.tainted? #=> true s.untrusted? #=> true =end -- http://bugs.ruby-lang.org/