diff --git a/ChangeLog b/ChangeLog index dbfa7c28b2..32df37baaf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Dec 6 18:56:42 2010 Kazuhiro NISHIYAMA + + * test/ruby/test_string.rb (TestString#test_scan): add a test for + [ruby-core:33338] #4087. + Mon Dec 6 18:55:36 2010 Kazuhiro NISHIYAMA * test/uri/test_common.rb (TestCommon#test_encode_www_form): add diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb index e8287622f6..16a6905667 100644 --- a/test/ruby/test_string.rb +++ b/test/ruby/test_string.rb @@ -968,6 +968,14 @@ class TestString < Test::Unit::TestCase res = [] a.scan(/(...)/) { |w| res << w } assert_equal([[S("cru")], [S("el ")], [S("wor")]],res) + + a = S("hello") + a.taint + a.untrust + res = [] + a.scan(/./) { |w| res << w } + assert(res[0].tainted?, '[ruby-core:33338] #4087') + assert(res[0].untrusted?, '[ruby-core:33338] #4087') end def test_size