Skip to content

Commit

Permalink
Also consider @bound_method for equality
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoqun committed Feb 13, 2013
1 parent d8c6c2c commit 39fc4ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kernel/common/proc.rb
Expand Up @@ -54,6 +54,7 @@ def self.new(*args)
end

attr_accessor :block
attr_accessor :bound_method

def binding
bind = @block.to_binding
Expand All @@ -63,7 +64,7 @@ def binding

def ==(other)
return false unless other.kind_of? self.class
@block == other.block
@block == other.block and @bound_method == other.bound_method
end

def arity
Expand Down

0 comments on commit 39fc4ee

Please sign in to comment.