From 36b4a60a458564cabf282f36cb7b5ececfd31f6c Mon Sep 17 00:00:00 2001 From: akr Date: Tue, 16 Oct 2007 11:06:27 +0000 Subject: 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: http://svn.ruby-lang.org/repos/ruby/trunk@13724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- bootstraptest/test_knownbug.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'bootstraptest') diff --git a/bootstraptest/test_knownbug.rb b/bootstraptest/test_knownbug.rb index 23a020a77..c2d0624bb 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 +} -- cgit