[MacRuby-devel] [MacRuby] #716: Undefining a method and then calling the method with a different arity than the original fails wrong

MacRuby ruby-noreply at macosforge.org
Fri May 14 15:54:30 PDT 2010


#716: Undefining a method and then calling the method with a different arity than
the original fails wrong
-------------------------------------+--------------------------------------
 Reporter:  eloy.de.enige@…          |       Owner:  eloy.de.enige@…        
     Type:  defect                   |      Status:  new                    
 Priority:  blocker                  |   Milestone:                         
Component:  MacRuby                  |    Keywords:  mocha                  
-------------------------------------+--------------------------------------
 {{{
 % cat t.rb
 class X
   undef_method :require

   def method_missing(m, *a, &b)
     p m, a, b
   end
 end

 X.new.require

 % ruby19 t.rb
 :require
 []
 nil

 % macruby t.rb
 /Users/eloy/Documents/DEVELOPMENT/MacRuby/macruby/t.rb:1:in `<main>':
 wrong number of arguments (0 for 0) (ArgumentError)
 }}}

 This most likely has to do with the difference in arity, as calling
 require *with* an arg works as expected.

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/716>
MacRuby <http://macruby.org/>



More information about the MacRuby-devel mailing list