On Thu, Nov 20, 2014 at 3:26 PM, Chris Hulan <chris.hulan / gmail.com> wrote:
> naming is important
> you have a function 'sum' with a variable 'sum'
> the interpreter is calling the function where you expect it to use the
> variable

He is simply invoking #inject on the wrong object (i.e. result of
recursively invoking sum).

Cheers

robert


-- 
[guy, jim].each {|him| remember.him do |as, often| as.you_can - without end}
http://blog.rubybestpractices.com/