Fix object serialization
Prevent inject from returning nil
https://github.com/remiprev/her/issues/401
Another option to help avoid an incorrect return type (while allowing the use of next) is to use Enumerable#each_with_object. It might have a slight side benefit of making it a little harder for this to break in the future. Speaking of which, I'd love to see a spec for this too. From the contribution guide:
Add examples that describe it (in the spec directory). Only refactoring and documentation changes require no new tests. If you are adding functionality or fixing a bug, we need examples!
I'm not entirely sure how to build a spec for This scenario. Also it might even be overkill considering it's a bad usage of inject. Regarding the each with object, I agree it might be a better solution to the inject in this case.
hi @avdmatamoros @mtwentyman @cimtico I've just got commit access on this repo and plan to get back on track with maintenance over time - will be in touch soon!