The answer is that when Ruby searches for singleton methods in the
eigenclass of an object, it also searches the superclass (and all
ancestors) of the eigenclass as well.
On Sep 25, 11:05 pm, John Merlino stoici...@aol.com wrote:
For the method invocation expression o.m, Ruby performs name
John Merlino wrote in post #1077564:
For the method invocation expression o.m, Ruby performs name
resolution with the following steps: 1) first, it checks the
eigenclass of o for singleton methods named m. 2) If no method m is
found in the eigenclass, Ruby searches the class of the o for an
2 matches
Mail list logo