diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-23 12:45:09 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-23 12:45:09 +0000 |
commit | 461b1452da6ff1bddb5c25af232ac79f3d9bfb22 (patch) | |
tree | 7c2b553dac26baa999f085adfb40bdd17ec1ac07 /test | |
parent | 7869d38b468a20297c9b4196928e85557ea7754e (diff) |
merges r30094 from trunk into ruby_1_9_2.
--
* test/ruby/test_string.rb (TestString#test_scan): add a test for
[ruby-core:33338] #4087.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_string.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb index 5c2bce15cc..0d38c1a7f1 100644 --- a/test/ruby/test_string.rb +++ b/test/ruby/test_string.rb @@ -965,6 +965,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 |