[MacRuby] #1391: macruby interpreter quits on 'quit' out of scope

MacRuby ruby-noreply at macosforge.org
Fri Sep 23 16:00:18 PDT 2011


#1391: macruby interpreter quits on 'quit' out of scope
-----------------------------+----------------------------------------------
 Reporter:  macruby@…        |       Owner:  lsansonetti@…        
     Type:  defect           |      Status:  new                  
 Priority:  minor            |   Milestone:                       
Component:  MacRuby          |    Keywords:                       
-----------------------------+----------------------------------------------

Comment(by kouji@…):

 Your idea (only extend the objects) looks good.

 In cRuby, IRB defines method quit(is aliased method irb_exit) of object
 main.
 IRB doesn't defines the method of Kernel.

 If IRB defines the method of Kernel, then we get no good behavior like the
 following.
 {{{
 $ ruby -e 'def quit; p "quit"; end; 1.quit'
 -e:1:in `<main>': private method `quit' called for 1:Fixnum
 (NoMethodError)
 }}}

 So I think only extend the objects is good idea. Thanks.

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/1391#comment:3>
MacRuby <http://macruby.org/>



More information about the macruby-tickets mailing list