Why the following code issues an error ?
[\'hello\',\'stack\',\'overflow\'].inject{|memo,s|memo+s.length} TypeError: can\'t convert Fixnum into String
Without the initial value, inject uses the first element in the collection as the initial value.
inject
see ruby-doc.