From 9d1bf5b33a118c65772f791cfc43276c070b1892 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 28 Mar 2014 02:28:18 +0000 Subject: string.c: infect match result * string.c (rb_pat_search): match result should be infected by the pattern. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_string.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/ruby/test_string.rb') diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb index 5ee026c327..a35f6a3bb7 100644 --- a/test/ruby/test_string.rb +++ b/test/ruby/test_string.rb @@ -1156,6 +1156,8 @@ class TestString < Test::Unit::TestCase /h/ =~ a a.scan('x') assert_nil($~) + + assert_equal(3, S("hello hello hello").scan("hello".taint).count(&:tainted?)) end def test_size -- cgit v1.2.3