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

ruby-changes:7057

From: matz <ko1@a...>
Date: Wed, 13 Aug 2008 17:33:12 +0900 (JST)
Subject: [ruby-changes:7057] Ruby:r18575 (trunk): * vm_insnhelper.c (caller_setup_args): should ensure if the value

matz	2008-08-13 17:32:53 +0900 (Wed, 13 Aug 2008)

  New Revision: 18575

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

  Log:
    * vm_insnhelper.c (caller_setup_args): should ensure if the value
      from to_proc is a real Proc.

  Modified files:
    trunk/ChangeLog
    trunk/vm_insnhelper.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 18574)
+++ ChangeLog	(revision 18575)
@@ -1,3 +1,8 @@
+Wed Aug 13 17:31:12 2008  Yukihiro Matsumoto  <matz@r...>
+
+	* vm_insnhelper.c (caller_setup_args): should ensure if the value
+	  from to_proc is a real Proc.
+
 Wed Aug 13 17:28:29 2008  Akinori MUSHA  <knu@i...>
 
 	* common.mk: regint.h no longer includes vm_core.h.
Index: vm_insnhelper.c
===================================================================
--- vm_insnhelper.c	(revision 18574)
+++ vm_insnhelper.c	(revision 18575)
@@ -221,7 +221,7 @@
 	    if (proc != Qnil) {
 		if (!rb_obj_is_proc(proc)) {
 		    VALUE b = rb_check_convert_type(proc, T_DATA, "Proc", "to_proc");
-		    if (NIL_P(b)) {
+		    if (NIL_P(b) || !rb_obj_is_proc(b)) {
 			rb_raise(rb_eTypeError,
 				 "wrong argument type %s (expected Proc)",
 				 rb_obj_classname(proc));

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

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