Project

General

Profile

Actions

Bug #11767

closed

Range#to_s and Range#inspect are not infected by the receiver

Added by nobu (Nobuyoshi Nakada) over 8 years ago. Updated over 8 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:71811]

Description

In general, to_s and inspect on a tainted object should result a tainted string.
Range seems the only exception.

code

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.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0