rubymotion/BubbleWrap — pull request #399 by jsteinberg (2014-07-21 18:21:15+00:00)
Title: Eventable .off fix when using method(:my_method) syntax

This PR contains a memory fix from PR(https://github.com/rubymotion/BubbleWrap/pull/398). Using ruby's method ==(http://ruby-doc.org/core-2.1.2/Method.html#method-i-3D-3D) is too strict when also using BubbleWrap::KVO.

From ruby-doc.org:
> Two method objects are equal if they are bound to the same object and refer to the same method definition and their owners are the same class or module.

If you begin observing an object after creating an event with a method(:), it can change the owner property of method(:) when you go to take off the event.

This change relaxes the definition of == for method objects for removal.