[MacRuby-devel] [MacRuby] #423: #respond_to? returns true, actual method call raises NoMethodError

MacRuby ruby-noreply at macosforge.org
Tue Feb 23 05:18:46 PST 2010


#423: #respond_to? returns true, actual method call raises NoMethodError
---------------------------------+------------------------------------------
 Reporter:  ecin@…               |       Owner:  martinlagardette@…        
     Type:  enhancement          |      Status:  assigned                  
 Priority:  minor                |   Milestone:                            
Component:  MacRuby              |    Keywords:                            
---------------------------------+------------------------------------------
Changes (by martinlagardette@…):

  * status:  new => assigned


Comment:

 Actually, after further analysis, `respond_to?` should be fine the way it
 is now.[[BR]]
 `respond_to? :test` on ruby methods returns true wether it has arguments,
 or not.[[BR]]
 Obj-C message passing differs, and in theory, `-test` != `-test:`, but I
 highly doubt there are any cases where the difference will be
 needed.[[BR]]

 I will however see if there is a way / a need to improve the error that
 pops outon `-test` when only `-test:` is defined, but `#respond_to?` works
 fine for now.

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



More information about the MacRuby-devel mailing list