Use #each_with_object instead of #inject.

Enumerable#inject requires the block to return the accumulator,
as #each_with_object stores the accumulator to be yielded internally.
Merge pull request #8 from fuadsaud/each-with-object

Use #each_with_object instead of #inject.