diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-10-16 11:06:27 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-10-16 11:06:27 +0000 |
commit | 24c863cf84f8c4573d2b8c30c88258c6b18e9f1a (patch) | |
tree | 89b25c18d77bef5a394b5c54bf24ef0e72fbb56b | |
parent | 5d8ba5a43faac6b74ab838c8b3fa22f07c387a0e (diff) | |
download | ruby-24c863cf84f8c4573d2b8c30c88258c6b18e9f1a.tar.gz |
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
-rw-r--r-- | bootstraptest/test_knownbug.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bootstraptest/test_knownbug.rb b/bootstraptest/test_knownbug.rb index 23a020a771..c2d0624bb8 100644 --- a/bootstraptest/test_knownbug.rb +++ b/bootstraptest/test_knownbug.rb @@ -45,3 +45,15 @@ assert_normal_exit %q{ assert_normal_exit %q{ 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 +} |