[MacRuby] #929: Colons are always appended to the selector during define_method

MacRuby ruby-noreply at macosforge.org
Mon Oct 4 00:22:56 PDT 2010


#929: Colons are always appended to the selector during define_method
---------------------------------+------------------------------------------
 Reporter:  dev@…                |       Owner:  lsansonetti@…        
     Type:  defect               |      Status:  new                  
 Priority:  minor                |   Milestone:                       
Component:  MacRuby              |    Keywords:                       
---------------------------------+------------------------------------------
 Subject: Objective-C-style selectors and define_method
 ------------------------

 {{{
     class Foo
       # def foo(a, bar:b); puts a, b end
       define_method :"foo:bar" do |a, b| puts a, b end
     end

     Foo.new.foo(0, bar:1)
 }}}

 ----------
 From: Laurent Sansonetti

 Nope, seems good :) I would however pass :"foo:bar:" instead. I believe
 MacRuby will add the trailing : for you but it's clearer to be explicit
 here.

 ----------
 From: Caio Chassot

 Oh, actually I tried that first, and it added a second :, and failed.

 ----------
 From: Laurent Sansonetti

 Ticket or it never happened! :)

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



More information about the macruby-tickets mailing list