[MacRuby-devel] Re: [ruby] #47: Cannot pass a :symbol directly as a named parameter

ruby ruby-noreply at macosforge.org
Mon Apr 7 16:30:06 PDT 2008


#47: Cannot pass a :symbol directly as a named parameter
------------------------------------------+---------------------------------
 Reporter:  cremes at mac.com                |        Owner:  lsansonetti at apple.com
     Type:  defect                        |       Status:  new                  
 Priority:  minor                         |    Milestone:  MacRuby 0.2          
Component:  MacRuby                       |   Resolution:                       
 Keywords:  symbol named keyed parameter  |  
------------------------------------------+---------------------------------
Comment (by lsansonetti at apple.com):

 Currently, {{{a.setValue("triple", forKey::three}}} produces {{{undefined
 local variable or method `forKey' for main:Object (NameError)}}}.

 I wonder if we should do something. {{{forKey::three}}} is a perfectly
 valid syntax (it basically means {{{forKey.three}}}).

 {{{
 >> 123.to_s
 => "123"
 >> 123::to_s
 => "123"
 }}}

 In that case it would mean: send {{{#setValue}}} with 2 regular (not-
 named) arguments: {{{"triple"}}} and the result of {{{forKey::three}}}.

-- 
Ticket URL: <http://trac.macosforge.org/projects/ruby/ticket/47#comment:1>
ruby <http://ruby.macosforge.org/>


More information about the MacRuby-devel mailing list