mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 21:14:23 +02:00
string.c: term fill
* string.c (rb_str_chomp_bang): fill wchar terminator. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0c50d7ba15
commit
c77efe1144
2 changed files with 5 additions and 1 deletions
|
@ -48,6 +48,10 @@ class Test_StringCStr < Test::Unit::TestCase
|
|||
assert_wchars_term_char("a ") {|s| s.rstrip!}
|
||||
end
|
||||
|
||||
def test_wchar_chop!
|
||||
assert_wchars_term_char("a\n") {|s| s.chop!}
|
||||
end
|
||||
|
||||
def assert_wchars_term_char(str)
|
||||
result = {}
|
||||
WCHARS.map do |enc|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue