Skip to content

Instantly share code, notes, and snippets.

@wanabe
Created May 5, 2013 07:30
Show Gist options
  • Select an option

  • Save wanabe/5520026 to your computer and use it in GitHub Desktop.

Select an option

Save wanabe/5520026 to your computer and use it in GitHub Desktop.
diff --git a/insns.def b/insns.def
index c339180..9be0eda 100644
--- a/insns.def
+++ b/insns.def
@@ -765,13 +765,10 @@ defined
}
break;
case DEFINED_ZSUPER:{
- const rb_method_entry_t *me = GET_CFP()->me;
- if (me) {
- VALUE klass = vm_search_normal_superclass(GET_CFP()->klass);
- ID id = me->def ? me->def->original_id : me->called_id;
- if (rb_method_boundp(klass, id, 0)) {
- expr_type = DEFINED_ZSUPER;
- }
+ rb_call_info_t cit;
+ vm_search_superclass(GET_CFP(), GET_ISEQ(), Qnil, &cit);
+ if (rb_method_boundp(cit.klass, cit.mid, 0)) {
+ expr_type = DEFINED_ZSUPER;
}
break;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment