[Jruby-devel] jirb issue - explicitly scoping everything within Kernel

2006-03-15 Thread Charles O Nutter
I noticed this evening that classes defined in IRB under JRuby are being explicitly scoped in Kernel. While this isn't really harming anything, it does show that our nesting is including Kernel when in IRB, though it should not. irb(main):001:0> class Fooirb(main):002:1> end=> nilirb(main):003:0> x

Re: [Jruby-devel] another Head regression (#7)

2006-03-15 Thread Thomas E Enebo
On Wed, 15 Mar 2006, David Corbin defenestrated me: > On Wednesday 15 March 2006 09:02 pm, Charles O Nutter wrote: > > including a module at the root level actually ends up including it into > > Object, because all code runs within the context of a global Object > > instance. > > Are you describ

Re: [Jruby-devel] another Head regression (#7)

2006-03-15 Thread David Corbin
On Wednesday 15 March 2006 09:02 pm, Charles O Nutter wrote: > including a module at the root level actually ends up including it into > Object, because all code runs within the context of a global Object > instance. Are you describing jruby , or ruby (or both). It makes no sense to me why incl

Re: [Jruby-devel] another Head regression (#7)

2006-03-15 Thread Charles O Nutter
including a module at the root level actually ends up including it into Object, because all code runs within the context of a global Object instance. Calling include at root is actually like calling the private "include" method on the Object class, adding that module's capabilities to all Object in

Re: [Jruby-devel] another Head regression (#7)

2006-03-15 Thread David Corbin
On Wednesday 15 March 2006 08:58 am, Thomas E Enebo wrote: > Ding! Any object that already exists in Ruby will get called > before a method_missing. I am thinking about options. Yours is > probably a pretty decent one... I still don't understand. Can you respond to my earlier response? > >

Re: [Jruby-devel] another Head regression (#7)

2006-03-15 Thread Charles O Nutter
Tom touched on this, but it's because when we include a module into Object, its methods are then available to not only all code at the root level but to all classes that extend Object (i.e. all classes period). Because the method will now exist in ArrayList's hierarchy, method_missing never fires,

Re: [Jruby-devel] another Head regression (#7)

2006-03-15 Thread Thomas E Enebo
Ding! Any object that already exists in Ruby will get called before a method_missing. I am thinking about options. Yours is probably a pretty decent one... David, change your code to use << instead of add for right now to keep moving through any regressions... -Tom On Tue, 14 Mar 2006, Ch

Re: [Jruby-devel] another Head regression (#7)

2006-03-15 Thread David Corbin
First, I notice that there is a "typo" in the demo. The "include ModB" should be "include ModA". On Tuesday 14 March 2006 11:56 pm, Charles O Nutter wrote: > Ahh, here's my theory, based on a quick look. > > It's because of the lazy loading of methods!!! Huzzah! I knew this one > would come arou