Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed a bug in Method#== where it wouldn't work on pure objc methods

git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4400 23306eb0-4c56-4727-a40e-e92c0eb68959
  • Loading branch information...
commit c57d706eb83228a27f18179a37e20ad9b98fc970 1 parent 6199eb8
Laurent Sansonetti authored
Showing with 11 additions and 2 deletions.
  1. +11 −2 proc.c
View
13 proc.c
@@ -720,8 +720,17 @@ method_eq(VALUE method, SEL sel, VALUE other)
if (m1->oclass != m2->oclass
|| m1->rclass != m2->rclass
- || m1->recv != m2->recv
- || m1->node->objc_imp != m2->node->objc_imp) {
+ || m1->recv != m2->recv) {
+ return Qfalse;
+ }
+
+ IMP m1_imp = m1->node == NULL
+ ? class_getMethodImplementation((Class)m1->oclass, m1->sel)
+ : m1->node->objc_imp;
+ IMP m2_imp = m2->node == NULL
+ ? class_getMethodImplementation((Class)m2->oclass, m2->sel)
+ : m2->node->objc_imp;
+ if (m1_imp != m2_imp) {
return Qfalse;
}
Please sign in to comment.
Something went wrong with that request. Please try again.