summaryrefslogtreecommitdiff
path: root/insnhelper.ci
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-03 19:59:59 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-03 19:59:59 +0000
commit21b644e8123d357df653b65689273be51617bae3 (patch)
treec1dac5e4a88eb64a91f6e5b848d47aacbbb3e6cd /insnhelper.ci
parent04e9a81b8e969dd4827219572880c05e5fbac2f8 (diff)
* insnhelper.ci (caller_setup_args): fix to show correct class
on an error message (ex: m(&1)). [ruby-dev:31101] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'insnhelper.ci')
-rw-r--r--insnhelper.ci5
1 files changed, 3 insertions, 2 deletions
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;