summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-09-01 07:52:16 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-09-01 07:52:16 +0000
commit09fb7189ec8b886b356618274b6b7b5bcc4aebe8 (patch)
treeae161c4150a422ecc1d924e6e56e0faca25864ec /test
parentd53e0fe330649007a843a837108583fb670e192d (diff)
* string.c (tr_setup_table): optimized. don't create hash objects
when given pattern is ASCII only. * string.c (tr_find): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_string.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb
index ce90c1e8d7..22938e0c1f 100644
--- a/test/ruby/test_string.rb
+++ b/test/ruby/test_string.rb
@@ -481,6 +481,7 @@ class TestString < Test::Unit::TestCase
assert_equal(0, S("y").count(S("a\\-z")))
assert_equal(5, "abc\u{3042 3044 3046}".count("^a"))
assert_equal(5, "abc\u{3042 3044 3046}".count("^\u3042"))
+ assert_equal(2, "abc\u{3042 3044 3046}".count("a-z", "^a"))
assert_raise(ArgumentError) { "foo".count }
end