summaryrefslogtreecommitdiffstats
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
commit27eaef29a270421d68737711c13632a616256781 (patch)
treec1dac5e4a88eb64a91f6e5b848d47aacbbb3e6cd /insnhelper.ci
parent5fc55e280982d7c9e7e6bf7a4d6718f63d6babc7 (diff)
downloadruby-27eaef29a270421d68737711c13632a616256781.tar.gz
ruby-27eaef29a270421d68737711c13632a616256781.tar.xz
ruby-27eaef29a270421d68737711c13632a616256781.zip
* insnhelper.ci (caller_setup_args): fix to show correct class
on an error message (ex: m(&1)). [ruby-dev:31101] git-svn-id: http://svn.ruby-lang.org/repos/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 92e88e963..73ea6ee09 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;