diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-22 01:47:11 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-22 01:47:11 +0000 |
commit | a4a3293fb9ed377944ee49e8d80b111df42bbfc8 (patch) | |
tree | e7df1c3fec0f6f2c2c447313ce4da631204d60a0 /bootstraptest | |
parent | fb1991448459be553b9140a80eb8c8c149b89464 (diff) | |
download | ruby-a4a3293fb9ed377944ee49e8d80b111df42bbfc8.tar.gz ruby-a4a3293fb9ed377944ee49e8d80b111df42bbfc8.tar.xz ruby-a4a3293fb9ed377944ee49e8d80b111df42bbfc8.zip |
* 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/trunk@22495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest')
-rw-r--r-- | bootstraptest/test_method.rb | 11 |
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]' |