diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-13 08:32:53 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-13 08:32:53 +0000 |
| commit | 56e03c1bc8cfa127b4b991104e7363b2ea444c32 (patch) | |
| tree | 8847d86c96b64e1e073c31680e902cf1a6b7e2b5 | |
| parent | f9866f4c3e9d5f6f50713656881e0986c6377a58 (diff) | |
| download | ruby-56e03c1bc8cfa127b4b991104e7363b2ea444c32.tar.gz ruby-56e03c1bc8cfa127b4b991104e7363b2ea444c32.tar.xz ruby-56e03c1bc8cfa127b4b991104e7363b2ea444c32.zip | |
* vm_insnhelper.c (caller_setup_args): should ensure if the value
from to_proc is a real Proc.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18575 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | vm_insnhelper.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Wed Aug 13 17:31:12 2008 Yukihiro Matsumoto <matz@ruby-lang.org> + + * 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@iDaemons.org> * common.mk: regint.h no longer includes vm_core.h. diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 0fe990241..a5967f736 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -221,7 +221,7 @@ caller_setup_args(const rb_thread_t *th, rb_control_frame_t *cfp, VALUE flag, 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)); |
