[前][次][番号順一覧][スレッド一覧]

ruby-changes:10919

From: nobu <ko1@a...>
Date: Sun, 22 Feb 2009 10:47:18 +0900 (JST)
Subject: [ruby-changes:10919] Ruby:r22495 (trunk): * vm_eval.c (method_missing): should not pop cfp if missing method

nobu	2009-02-22 10:47:11 +0900 (Sun, 22 Feb 2009)

  New Revision: 22495

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=22495

  Log:
    * 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.

  Modified files:
    trunk/bootstraptest/test_method.rb

Index: bootstraptest/test_method.rb
===================================================================
--- bootstraptest/test_method.rb	(revision 22494)
+++ bootstraptest/test_method.rb	(revision 22495)
@@ -1140,3 +1140,14 @@
   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]'

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]