diff options
author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-17 22:43:35 +0000 |
---|---|---|
committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-17 22:43:35 +0000 |
commit | 0c659e26cb8839dec8eb2559a8c7ff98a56c4e88 (patch) | |
tree | 178300a472960f60ed58648893d5d49861ef449c /vm.c | |
parent | ea4b4d3a769fb71cde1085c9652efa57b7596170 (diff) |
* vm.c (rb_vm_check_redefinition_opt_method): should check the real
class instead of the origin iclass.
[ruby-core:72188] [Bug #11826]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r-- | vm.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1400,6 +1400,9 @@ static void rb_vm_check_redefinition_opt_method(const rb_method_entry_t *me, VALUE klass) { st_data_t bop; + if (RB_TYPE_P(klass, T_ICLASS) && FL_TEST(klass, RICLASS_IS_ORIGIN)) { + klass = RBASIC_CLASS(klass); + } if (me->def->type == VM_METHOD_TYPE_CFUNC) { if (st_lookup(vm_opt_method_table, (st_data_t)me, &bop)) { int flag = vm_redefinition_check_flag(klass); |