diff --git a/ChangeLog b/ChangeLog index 592f7bd9c7..a96826c514 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Jul 4 04:58:30 2007 Koichi Sasada + + * insnhelper.ci (caller_setup_args): fix to show correct class + on an error message (ex: m(&1)). [ruby-dev:31101] + Wed Jul 4 04:30:32 2007 Koichi Sasada * compile.c (compile_array, iseq_compile_each): fix about array diff --git a/insnhelper.ci b/insnhelper.ci index 92e88e9632..73ea6ee09a 100644 --- a/insnhelper.ci +++ b/insnhelper.ci @@ -196,12 +196,13 @@ caller_setup_args(rb_thread_t *th, rb_control_frame_t *cfp, VALUE flag, if (proc != Qnil) { if (!rb_obj_is_proc(proc)) { - proc = rb_check_convert_type(proc, T_DATA, "Proc", "to_proc"); - if (!rb_obj_is_proc(proc)) { + VALUE b = rb_check_convert_type(proc, T_DATA, "Proc", "to_proc"); + if (NIL_P(b)) { rb_raise(rb_eTypeError, "wrong argument type %s (expected Proc)", rb_obj_classname(proc)); } + proc = b; } GetProcPtr(proc, po); blockptr = &po->block;