On 2005-04-14, Martin DeMello <martindemello / yahoo.com> wrote:
>> It might be that IRB.start_in_fxirb is the appropriate place to define
>> the singleton (I'd say so). But what do you mean by "the only place I
>> have access to ..."? IRB.conf[:MAIN_CONTEXT] is a global accessor, it
>> should work everywhere (unless you have somewhere another IRB constant,
>> which I'm sure is not the case, but even then you could access the
>> object as such via TOPLEVEL_BINDING).
>
> I was referring to the fact that I created the Irb.new instance within
> start_in_fxirb, and called that within a thread, so I didn't really have
> any other logical place to add a singleton method to the object. Ignore
> the rest - it looks like we were talking at cross purposes :) I was jsut
> a bit worried by your comment about creating a new reader 'cause I
> couldn't see where that was happening.

OK, I see.

Csaba