Csaba Henk <csaba / phony_for_avoiding_spam.org> wrote:
> 
> > As far as I can make out, inside IRB.start_in_fxirb is the only place I
> > have access to the IRB.conf[:MAIN_CONTEXT] object after it is
> > initialised to Irb.new, so that I can create the appropriate singleton
> > method.
> 
> 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.

martin