summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-10 06:19:21 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-10 06:19:21 +0000
commitdf8833203edfb8d7c43044d6a06fd038c0fa4779 (patch)
tree4ceace9e4f2b28712a8696d5ee4f464c1f325a7e /eval.c
parentf51bd1d018f16c0da82f05973879e2080d9cc783 (diff)
* eval.c (mnew): original class of method defined in module should
be the module not intermediate class. [ruby-dev:19040] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index d35b9b7..1daf12e 100644
--- a/eval.c
+++ b/eval.c
@@ -6878,6 +6878,7 @@ mnew(klass, obj, id, mklass)
goto again;
}
+ if (TYPE(klass) == T_ICLASS) klass = RBASIC(klass)->klass;
method = Data_Make_Struct(mklass, struct METHOD, bm_mark, free, data);
data->klass = klass;
data->recv = obj;