mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test updated.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
384e8e6680
commit
7c9e815d94
1 changed files with 4 additions and 0 deletions
|
@ -259,6 +259,10 @@ EOT
|
|||
|
||||
def test_gsub
|
||||
s = "abcd".force_encoding("utf-16be")
|
||||
assert_nothing_raised {
|
||||
s.gsub(Regexp.new(".".encode("utf-16be")), "xy")
|
||||
}
|
||||
s = "ab\0\ncd".force_encoding("utf-16be")
|
||||
assert_raise(ArgumentError) {
|
||||
s.gsub(Regexp.new(".".encode("utf-16be")), "xy")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue