summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-30 12:50:48 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-01-30 12:50:48 +0000
commitbe40bdbad7f2ca2cf980f89a541336111c3c29de (patch)
tree3572ee73442aed458858b9e03a14983cf6060ba3 /vm_method.c
parentd274933b1371a2569f0adde526496e18891a58c4 (diff)
* vm_method.c (rb_alias): treats an alias as if it is a newly defined
method so that oklass in a method cache refers the class on which the aliasing occured. [ruby-core:26074] (#2202). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm_method.c b/vm_method.c
index 815de8773d..b3c39776e1 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -771,7 +771,7 @@ rb_alias(VALUE klass, ID name, ID def)
st_insert(RCLASS_M_TBL(klass), name,
(st_data_t) NEW_FBODY(
method = NEW_METHOD(orig_fbody->nd_body->nd_body,
- orig_fbody->nd_body->nd_clss,
+ klass,
NOEX_WITH_SAFE(orig_fbody->nd_body->nd_noex)), def));
method->nd_file = (void *)def;