Yeah, this is unpleasant to look at but doesn't otherwise affect the functionality. The issue is how the IRB "workspace" and "context" are set up. There's heavy use of bindings to allow code entered into IRB to run in the correct context; in general, it should run under the toplevel Object instance that normal Ruby scripts run under. Instead, as evidenced by the following demo, it's running under the IRB workspace itself:
in irb under C Ruby: C:\JRubyWork\jruby3>irb irb(main):001:0> puts Module.nesting => nil in "jirb": C:\JRubyWork\jruby3>jirb irb(#<IRB::WorkSpace:0x22b29a>):001:0> puts Module.nesting IRB::WorkSpace IRB => nil I think this is related to something I saw while working on bindings. I noticed that C Ruby's "block" structure--used to hold context for blocks, bindings, lambdas, and procs--has a slot to hold the "wrapper" class for a given context, where ours does not. It's possible this is causing the odd context within IRB, and certainly could be contributing to other incompatibilities. At any rate, it's pretty deep in the interpreter, but we'll get it fixed. On 3/2/06, David Corbin <[EMAIL PROTECTED]> wrote: > Great work. I notice (in your blog) that the prompt is "verbose, and javaish". > We should fix this too. > > I'll take a look at 'jirb' this weekend. > > David -- Charles Oliver Nutter @ headius.blogspot.com JRuby Developer @ jruby.sourceforge.net Application Architect @ www.ventera.com ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 _______________________________________________ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel