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
@ -259,6 +259,10 @@ EOT
|
|||||||
|
|
||||||
def test_gsub
|
def test_gsub
|
||||||
s = "abcd".force_encoding("utf-16be")
|
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) {
|
assert_raise(ArgumentError) {
|
||||||
s.gsub(Regexp.new(".".encode("utf-16be")), "xy")
|
s.gsub(Regexp.new(".".encode("utf-16be")), "xy")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user