ruby-changes:18073
From: kazu <ko1@a...>
Date: Mon, 6 Dec 2010 19:01:56 +0900 (JST)
Subject: [ruby-changes:18073] Ruby:r30094 (trunk): * test/ruby/test_string.rb (TestString#test_scan): add a test for
kazu 2010-12-06 19:01:45 +0900 (Mon, 06 Dec 2010) New Revision: 30094 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30094 Log: * test/ruby/test_string.rb (TestString#test_scan): add a test for [ruby-core:33338] #4087. Modified files: trunk/ChangeLog trunk/test/ruby/test_string.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 30093) +++ ChangeLog (revision 30094) @@ -1,3 +1,8 @@ +Mon Dec 6 18:56:42 2010 Kazuhiro NISHIYAMA <zn@m...> + + * 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 <zn@m...> * test/uri/test_common.rb (TestCommon#test_encode_www_form): add Index: test/ruby/test_string.rb =================================================================== --- test/ruby/test_string.rb (revision 30093) +++ test/ruby/test_string.rb (revision 30094) @@ -968,6 +968,14 @@ 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/