mirror of
https://github.com/ruby/ruby.git
synced 2025-08-28 15:36:16 +02:00
* string.c (rb_str_delete_bang): should recalculate coderange.
[ruby-talk:329267] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4b265d3e7b
commit
42eeb2c1b1
3 changed files with 20 additions and 2 deletions
|
@ -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!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue