Revert "Replace `inject` to `each_with_object`"

This reverts commit 15ae7b5d389e8f328a607eeecbe0baf828fcb7ba.
Revert "Remove support for Ruby 1.8.7"

This reverts commit 64fdb05b9fa9c6d477a0713c6f7d585676a36077.