From: Nobuyoshi Nakada <nobu@...>
Date: 2012-01-17T17:34:48+09:00
Subject: [ruby-core:42162] [ruby-trunk - Bug #5902][Assigned] Array#join with an unused, infected separator may or may not infect the result


Issue #5902 has been updated by Nobuyoshi Nakada.

File bug-5902.diff added
Category set to core
Status changed from Open to Assigned
Assignee set to Yukihiro Matsumoto

Sounds reasonable.
----------------------------------------
Bug #5902: Array#join with an unused, infected separator may or may not infect the result
https://bugs.ruby-lang.org/issues/5902

Author: John Firebaugh
Status: Assigned
Priority: Normal
Assignee: Yukihiro Matsumoto
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/