Actions
Bug #1898
closedMethod#== for Methods with the Same Body
Description
=begin
The documentation for Method#== states "Two method objects are equal if that[sic] are bound to the same object and contain the same body." However, this doesn't seem to be true. Defining a method with either the same literal body or the same block (through define_method) doesn't create equal method objects. If this is intentional, could the documentation be clarified? It appears that methods are equal if:
-
They're bound to the same object, and
-
They have the same name, or,
-
They were designated as aliases with the alias keyword, or
-
They're a core method which is an alias.
Is this correct? (No patch because I'm not certain about how it's supposed to work).
=end
Actions
Like0
Like0Like0Like0