summaryrefslogtreecommitdiffstats
path: root/bootstraptest
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-22 14:05:31 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-22 14:05:31 +0000
commit422dd55bdb980145cbbb97da8f23defdf7e872d1 (patch)
tree10993c12f8f71f9728454f32759be9679822d67c /bootstraptest
parent04f8cdf51cfbac7068f88a6dbaa958339adf5016 (diff)
merges r22494 and r22495 from trunk into ruby_1_9_1.
* vm_eval.c (method_missing): should not pop cfp if missing method is method_missing. [ruby-core:22298] * vm_eval.c (rb_raise_method_missing): new function to directly raise NoMethodError. * vm_insnhelper.c (vm_call_method): fixed the case method_missing is missing. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@22551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest')
-rw-r--r--bootstraptest/test_method.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/bootstraptest/test_method.rb b/bootstraptest/test_method.rb
index 136fce497..8953a0d4d 100644
--- a/bootstraptest/test_method.rb
+++ b/bootstraptest/test_method.rb
@@ -1140,3 +1140,14 @@ assert_equal 'Object#foo', %q{
end
Foo.foo
}, '[ruby-dev:37587]'
+
+assert_normal_exit %q{
+ class BasicObject
+ remove_method :method_missing
+ end
+ begin
+ "a".lalala!
+ rescue NoMethodError => e
+ e.message == "undefined method `lalala!' for \"a\":String" ? :ok : :ng
+ end
+}, '[ruby-core:22298]'