* 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/trunk@30094 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9600d9693c
commit
dd77ae9f6c
@ -1,3 +1,8 @@
|
|||||||
|
Mon Dec 6 18:56:42 2010 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
|
||||||
|
|
||||||
|
* 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@mbf.nifty.com>
|
Mon Dec 6 18:55:36 2010 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
|
||||||
|
|
||||||
* test/uri/test_common.rb (TestCommon#test_encode_www_form): add
|
* test/uri/test_common.rb (TestCommon#test_encode_www_form): add
|
||||||
|
@ -968,6 +968,14 @@ class TestString < Test::Unit::TestCase
|
|||||||
res = []
|
res = []
|
||||||
a.scan(/(...)/) { |w| res << w }
|
a.scan(/(...)/) { |w| res << w }
|
||||||
assert_equal([[S("cru")], [S("el ")], [S("wor")]],res)
|
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
|
end
|
||||||
|
|
||||||
def test_size
|
def test_size
|
||||||
|
Loading…
x
Reference in New Issue
Block a user