diff options
Diffstat (limited to 'test/ruby/test_string.rb')
-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 |