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