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

ruby-changes:17136

From: nobu <ko1@a...>
Date: Sun, 29 Aug 2010 13:23:01 +0900 (JST)
Subject: [ruby-changes:17136] Ruby:r29136 (trunk): * vm.c (rb_thread_method_id_and_class): curried proc has no

nobu	2010-08-29 13:22:55 +0900 (Sun, 29 Aug 2010)

  New Revision: 29136

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

  Log:
    * vm.c (rb_thread_method_id_and_class): curried proc has no
      method.  [ruby-core:31871]

  Modified files:
    trunk/ChangeLog
    trunk/test/ruby/test_proc.rb
    trunk/vm.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 29135)
+++ ChangeLog	(revision 29136)
@@ -1,3 +1,8 @@
+Sun Aug 29 13:22:43 2010  Nobuyoshi Nakada  <nobu@r...>
+
+	* vm.c (rb_thread_method_id_and_class): curried proc has no
+	  method.  [ruby-core:31871]
+
 Sun Aug 29 12:51:33 2010  Nobuyoshi Nakada  <nobu@r...>
 
 	* load.c (rb_provide_feature): clarify error message for frozen
Index: vm.c
===================================================================
--- vm.c	(revision 29135)
+++ vm.c	(revision 29136)
@@ -1394,7 +1394,7 @@
 {
     rb_control_frame_t *cfp = th->cfp;
     rb_iseq_t *iseq = cfp->iseq;
-    if (!iseq) {
+    if (!iseq && cfp->me) {
 	if (idp) *idp = cfp->me->def->original_id;
 	if (klassp) *klassp = cfp->me->klass;
 	return 1;
Index: test/ruby/test_proc.rb
===================================================================
--- test/ruby/test_proc.rb	(revision 29135)
+++ test/ruby/test_proc.rb	(revision 29136)
@@ -792,4 +792,12 @@
       assert_equal([obj, nil], [a, b], '[ruby-core:24139]')
     end
   end
+
+  def test_curry_with_trace
+    bug3751 = '[ruby-core:31871]'
+    set_trace_func(proc {})
+    test_curry
+  ensure
+    set_trace_func(nil)
+  end
 end

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

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