From 42ecc77c464cd30ba4da9240f8d251979d12f433 Mon Sep 17 00:00:00 2001 From: ko1 Date: Tue, 27 Nov 2007 01:47:34 +0000 Subject: * eval.c (rb_method_missing): fix stack trace. * bootstraptest/test_knownbug.rb: move solved tests. * bootstraptest/test_method.rb, test/ruby/test_regexp.rb: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_regexp.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb index 2b10620d6..9cb8c4ac1 100644 --- a/test/ruby/test_regexp.rb +++ b/test/ruby/test_regexp.rb @@ -37,4 +37,16 @@ class TestRegexp < Test::Unit::TestCase def test_to_s assert_equal '(?-mix:\000)', Regexp.new("\0").to_s end + + def test_union + assert_equal :ok, begin + Regexp.union( + "a", + Regexp.new("\x80".force_encoding("euc-jp")), + Regexp.new("\x80".force_encoding("utf-8"))) + :ng + rescue ArgumentError + :ok + end + end end -- cgit