Skip to content
This repository has been archived by the owner on Sep 14, 2018. It is now read-only.

Commit

Permalink
Fix #1268: Compare bound method instances properly.
Browse files Browse the repository at this point in the history
Bound method instances should be compared by instance identity, not instance equality.
  • Loading branch information
jdhardy committed Feb 4, 2016
1 parent 18c34ee commit c5c192b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Languages/IronPython/IronPython/Runtime/Method.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public override bool Equals(object obj) {
if (other == null) return false;

return
PythonOps.EqualRetBool(_inst, other._inst) &&
object.ReferenceEquals(_inst, other._inst) &&
PythonOps.EqualRetBool(_func, other._func);
}

Expand Down

0 comments on commit c5c192b

Please sign in to comment.