merge revision(s) 42903: [Backport #8881]

* 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/branches/ruby_2_0_0@42924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nagachika 2013-09-12 16:08:31 +00:00
parent 3041c43df1
commit b55e9b7bf5
4 changed files with 21 additions and 1 deletions

View file

@ -989,6 +989,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 */