summaryrefslogtreecommitdiff
path: root/class.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-10 03:39:31 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-10 03:39:31 +0000
commit67129c8383f382eddd805411ef619d5c8c258dc3 (patch)
tree4c4db72dfa8de0712003b3481e6b50fb499c3379 /class.c
parent9d9dfc217240613e6e64f314d888b94fd9c80a4e (diff)
class.c: exclude refined methods
* class.c (method_entry_i): should exclude refined methods from instance method list. [ruby-core:57080] [Bug #8881] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'class.c')
-rw-r--r--class.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/class.c b/class.c
index 683bdbb..8a77d12 100644
--- a/class.c
+++ b/class.c
@@ -1121,6 +1121,10 @@ method_entry_i(st_data_t key, st_data_t value, st_data_t data)
st_table *list = (st_table *)data;
long type;
+ if (me && me->def->type == VM_METHOD_TYPE_REFINED) {
+ me = rb_resolve_refined_method(Qnil, me, NULL);
+ if (!me) return ST_CONTINUE;
+ }
if (!st_lookup(list, key, 0)) {
if (UNDEFINED_METHOD_ENTRY_P(me)) {
type = -1; /* none */