summaryrefslogtreecommitdiff
path: root/test/-ext-
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-10 12:26:11 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-10 12:26:11 +0000
commit7a77cf71335c426d973bbf94518177954a175945 (patch)
treec514d5b51e87b715edfdc75e64d2cc2290962dde /test/-ext-
parent117438ee7bb5fc99423cec201f804da540e340b8 (diff)
string.c: term fill
* string.c (rb_str_delete_bang): fill wchar terminator. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/-ext-')
-rw-r--r--test/-ext-/string/test_cstr.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/-ext-/string/test_cstr.rb b/test/-ext-/string/test_cstr.rb
index 4535921836..86670dc6e2 100644
--- a/test/-ext-/string/test_cstr.rb
+++ b/test/-ext-/string/test_cstr.rb
@@ -64,6 +64,10 @@ class Test_StringCStr < Test::Unit::TestCase
assert_wchars_term_char("foobar") {|s| s.sub!(/#{"foo".encode(s.encoding)}/, "")}
end
+ def test_wchar_delete!
+ assert_wchars_term_char("foobar") {|s| s.delete!("ao".encode(s.encoding))}
+ end
+
def assert_wchars_term_char(str)
result = {}
WCHARS.map do |enc|