[MacRuby-devel] macirb fails to start on 0.5b2 (undefined method `bind' for IRB::SLex:Class)

Logan Bowers logan at datacurrent.com
Sun Nov 22 15:53:56 PST 2009


I just downloaded and installed 0.5b2, however macirb fails to start; I get the following: 

bender:~ logan$ macirb
/usr/local/bin/macirb:in `<main>': undefined method `bind' for IRB::SLex:Class (NoMethodError)
bender:~ logan$ 

After doing a little digging, the culprit appears to be in e2mmap.rb:

module Exception2MessageMapper
  @RCS_ID='-$Id: e2mmap.rb,v 1.10 1999/02/17 12:33:17 keiju Exp keiju $-'

  E2MM = Exception2MessageMapper

  def E2MM.extend_object(cl)
    STDERR.puts("About to bind on #{cl.inspect}") # <---Line I added for debugging
    cl.bind(self) unless cl < E2MM  # <--- Exception is raised here!
  def bind(cl)
    self.module_eval %[
      def Raise(err = nil, *rest)
   Exception2MessageMapper.Raise(self.class, err, *rest)
      alias Fail Raise

      def self.included(mod)
   mod.extend Exception2MessageMapper

With the debugging line above, I see: 

bender:~ logan$ macirb
About to bind on IRB::Notifier
About to bind on IRB::SLex
/usr/local/bin/macirb:in `<main>': undefined method `bind' for IRB::SLex:Class (NoMethodError)
bender:~ logan$ 

Given that the 'bind' method is defined 3 lines later, I can't see why the call would succeed for IRB::Notifier and not for IRB::SLex.  Any ideas on what's going on?  FWIW, I'm running SL on a 32-bit machine.  Thanks!  

Logan Bowers

More information about the MacRuby-devel mailing list