From 9c7aab17a54996b7320e7bc34230a1aab7f7a115 Mon Sep 17 00:00:00 2001 From: ko1 Date: Tue, 27 Nov 2007 01:47:34 +0000 Subject: [PATCH] * 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@14026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 8 ++++++++ bootstraptest/test_knownbug.rb | 17 ----------------- bootstraptest/test_method.rb | 5 +++++ eval.c | 2 ++ test/ruby/test_regexp.rb | 12 ++++++++++++ 5 files changed, 27 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index fe5de409c0..cd9532064e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Tue Nov 27 10:45:45 2007 Koichi Sasada + + * 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. + Tue Nov 27 09:57:42 2007 Koichi Sasada * insns.def, compile.c: fix to allow dsym for alias/undef. diff --git a/bootstraptest/test_knownbug.rb b/bootstraptest/test_knownbug.rb index 398539df14..0cf5cf271b 100644 --- a/bootstraptest/test_knownbug.rb +++ b/bootstraptest/test_knownbug.rb @@ -3,23 +3,6 @@ # So all tests will cause failure. # -assert_not_match /method_missing/, %q{ - STDERR.reopen(STDOUT) - variable_or_mehtod_not_exist -} - -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 -} - assert_normal_exit %q{ STDERR.reopen(STDOUT) require 'yaml' diff --git a/bootstraptest/test_method.rb b/bootstraptest/test_method.rb index 7c2d6652a1..89488a40bc 100644 --- a/bootstraptest/test_method.rb +++ b/bootstraptest/test_method.rb @@ -1021,3 +1021,8 @@ assert_equal 'ok', %q{ :ok end } + +assert_not_match /method_missing/, %q{ + STDERR.reopen(STDOUT) + variable_or_mehtod_not_exist +} diff --git a/eval.c b/eval.c index 2f6300bdb7..27da2b2104 100644 --- a/eval.c +++ b/eval.c @@ -1327,6 +1327,8 @@ rb_method_missing(int argc, const VALUE *argv, VALUE obj) args[n++] = rb_ary_new4(argc - 1, argv + 1); } exc = rb_class_new_instance(n, args, exc); + + th->cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(th->cfp); rb_exc_raise(exc); } diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb index 2b10620d6c..9cb8c4ac1e 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