Hello Rubyists,
I am new to the language and the community.
My first problem is this :
i used the following code :
sum = 0
[1,3,5].inject() {|sum, element| sum + element}
print sum
I expected to get 9
but instead i get 4
I just installed the Ruby 1.8.6 one-click installer on windows
and wrote the above commands in SciTE.
Any suggestions??
--
Posted via http://www.ruby-forum.com/.