summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-11 21:06:14 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-11 21:06:14 +0000
commite4d1ccd0e6b7df60185f02a48d2d34c9d7de217e (patch)
tree03309c5f79516274d611ce5b44dc351b76358604 /eval.c
parent60325d37c5b42108d7e982ebe324832e68b55920 (diff)
downloadruby-e4d1ccd0e6b7df60185f02a48d2d34c9d7de217e.tar.gz
ruby-e4d1ccd0e6b7df60185f02a48d2d34c9d7de217e.tar.xz
ruby-e4d1ccd0e6b7df60185f02a48d2d34c9d7de217e.zip
* eval.c (proc_invoke): fix class name in warning message for
define_method. [ruby-dev:22235] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 5e88cf517..a09c753e0 100644
--- a/eval.c
+++ b/eval.c
@@ -7124,8 +7124,10 @@ proc_invoke(proc, args, self, klass)
volatile int pcall, avalue = Qtrue;
if (rb_block_given_p() && ruby_frame->last_func) {
+ if (klass != ruby_frame->last_class)
+ klass = rb_obj_class(proc);
rb_warning("block for %s#%s is useless",
- rb_obj_classname(proc),
+ rb_class2name(klass),
rb_id2name(ruby_frame->last_func));
}