[MacRuby-devel] [MacRuby] #685: inject doesn't work with Procs

MacRuby ruby-noreply at macosforge.org
Tue May 4 14:45:36 PDT 2010


#685: inject doesn't work with Procs
-------------------------------------+--------------------------------------
 Reporter:  hghoehne@…               |       Owner:  lsansonetti@…        
     Type:  defect                   |      Status:  new                  
 Priority:  major                    |   Milestone:  MacRuby 0.7          
Component:  MacRuby                  |    Keywords:                       
-------------------------------------+--------------------------------------
 {{{
 >> plus = :+.to_proc
 => #<Proc:0x20021a840>
 >> (1..100).inject(&plus)
 ArgumentError: wrong number of arguments (0 for 1)
 }}}
 or
 {{{
 >> (1..100).inject(&:+)
 ArgumentError: wrong number of arguments (0 for 1)
 }}}

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



More information about the MacRuby-devel mailing list