From b887c7c20ab81b50ed7cb8c7db3218c443985d6b Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 3 Dec 2015 07:02:19 +0000 Subject: string.c: should not taint fstring * string.c (rb_obj_as_string): fstring should not be infected. TODO: other frozen strings also may not be. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_object.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test') diff --git a/test/ruby/test_object.rb b/test/ruby/test_object.rb index a3c71d605c..27f3bd18ce 100644 --- a/test/ruby/test_object.rb +++ b/test/ruby/test_object.rb @@ -755,6 +755,15 @@ class TestObject < Test::Unit::TestCase end EOS assert_match(/\bToS\u{3042}:/, x) + + name = "X".freeze + x = Object.new.taint + class<