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
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 wrote:
> For the method invocation expression o.m, Ruby performs name
> resolution with the
2 matches
Mail list logo