From: nagachika00@... Date: 2015-12-03T17:57:28+00:00 Subject: [ruby-core:71814] [Ruby trunk - Bug #11767] Range#to_s and Range#inspect are not infected by the receiver Issue #11767 has been updated by Tomoyuki Chikanaga. Backport changed from 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: REQUIRED to 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: DONE Backported into `ruby_2_2` branch at r52873. ---------------------------------------- Bug #11767: Range#to_s and Range#inspect are not infected by the receiver https://bugs.ruby-lang.org/issues/11767#change-55220 * Author: Nobuyoshi Nakada * Status: Closed * Priority: Normal * Assignee: * ruby -v: r52866 * Backport: 2.0.0: REQUIRED, 2.1: REQUIRED, 2.2: DONE ---------------------------------------- In general, `to_s` and `inspect` on a tainted object should result a tainted string. `Range` seems the only exception. ## code ~~~ruby p ("0".taint.."1").to_s.tainted? p ("0".."1".taint).to_s.tainted? p ("0".."1").taint.to_s.tainted? ~~~ ## expected result prints `true` 3 times. ## actual result prints `true`, `true`, and `false`. -- https://bugs.ruby-lang.org/