It should be ArgumentError that
Regexp.union( "a", Regexp.new("\x80".force_encoding("euc-jp")), Regexp.new("\x80".force_encoding("utf-8"))). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5d8ba5a43f
commit
24c863cf84
@ -45,3 +45,15 @@ assert_normal_exit %q{
|
|||||||
assert_normal_exit %q{
|
assert_normal_exit %q{
|
||||||
Regexp.union("a", "a")
|
Regexp.union("a", "a")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert_equal 'ok', %q{
|
||||||
|
begin
|
||||||
|
Regexp.union(
|
||||||
|
"a",
|
||||||
|
Regexp.new("\x80".force_encoding("euc-jp")),
|
||||||
|
Regexp.new("\x80".force_encoding("utf-8")))
|
||||||
|
:ng
|
||||||
|
rescue ArgumentError
|
||||||
|
:ok
|
||||||
|
end
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user