summaryrefslogtreecommitdiffstats
path: root/test/ruby/test_string.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-24 17:17:35 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-24 17:17:35 +0000
commitd56a88abf55996332db4673b5d1863628d70e5d4 (patch)
treef7ec1977a708ccfede53c8367c748ce2c88642e4 /test/ruby/test_string.rb
parentcab461330ca14a055f26944cb861f31f861806c3 (diff)
downloadruby-d56a88abf55996332db4673b5d1863628d70e5d4.tar.gz
ruby-d56a88abf55996332db4673b5d1863628d70e5d4.tar.xz
ruby-d56a88abf55996332db4673b5d1863628d70e5d4.zip
* string.c (rb_str_delete_bang): should recalculate coderange.
[ruby-talk:329267] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_string.rb')
-rw-r--r--test/ruby/test_string.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb
index d4b6ff208..a995087bb 100644
--- a/test/ruby/test_string.rb
+++ b/test/ruby/test_string.rb
@@ -474,6 +474,11 @@ class TestString < Test::Unit::TestCase
assert_equal(S("he"), S("hello").delete(S("lo")))
assert_equal(S("hell"), S("hello").delete(S("aeiou"), S("^e")))
assert_equal(S("ho"), S("hello").delete(S("ej-m")))
+
+ assert_equal("a".hash, "a\u0101".delete("\u0101").hash, '[ruby-talk:329267]')
+ assert_equal(true, "a\u0101".delete("\u0101").ascii_only?)
+ assert_equal(true, "a\u3041".delete("\u3041").ascii_only?)
+ assert_equal(false, "a\u3041\u3042".tr("\u3041", "a").ascii_only?)
end
def test_delete!