her icon indicating copy to clipboard operation
her copied to clipboard

Fix object serialization

Open dmatamoroscr opened this issue 9 years ago • 3 comments

Prevent inject from returning nil

https://github.com/remiprev/her/issues/401

dmatamoroscr avatar Apr 14 '16 21:04 dmatamoroscr

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!

mtwentyman avatar Apr 26 '16 13:04 mtwentyman

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.

cimtico avatar May 02 '16 15:05 cimtico

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!

edtjones avatar Sep 29 '16 19:09 edtjones