1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
ko1 2007-11-27 01:47:34 +00:00
parent 329484693a
commit 9c7aab17a5
5 changed files with 27 additions and 17 deletions

View file

@ -1,3 +1,11 @@
Tue Nov 27 10:45:45 2007 Koichi Sasada <ko1@atdot.net>
* 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 <ko1@atdot.net>
* insns.def, compile.c: fix to allow dsym for alias/undef.

View file

@ -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'

View file

@ -1021,3 +1021,8 @@ assert_equal 'ok', %q{
:ok
end
}
assert_not_match /method_missing/, %q{
STDERR.reopen(STDOUT)
variable_or_mehtod_not_exist
}

2
eval.c
View file

@ -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);
}

View file

@ -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