On Fri, Mar 25, 2011 at 2:58 PM, Joey Zhou <yimutang / gmail.com> wrote:
>> Now if you were looking for a way to get from a singleton class of an
>> object to the object itself, I am not sure that this is possible.
>> I have not yet seen a case where I would have needed it, as I am
>> constructing my singletons myself;). Would you know such a usecase?
>> e.g. an API that passes in a singleton class and where it would be
>> useful to have access to the singlee - I just made this word up, I
>> guess.
>
> Thank you for explanation.
> The problem is not from a real program, but from my curiosity... I just
> read the "singleton class" section of a Ruby book:)

Than I am confident that

class << ...;self end.module_eval...

will be enough to continue your exploration :)

Cheers
R.
>
> --
> Posted via http://www.ruby-forum.com/.
>
>



-- 
The 1,000,000th fibonacci number contains '42' 2039 times; that is
almost 30 occurrences more than expected (208988 digits).
N.B. The 42nd fibonacci number does not contain '1000000' that is
almost the expected 3.0e-06 times.