solnic / virtus

[DISCONTINUED ] Attributes on Steroids for Plain Old Ruby Objects
MIT License
3.77k stars 228 forks source link

Don't coerce nil for collection attributes when required is false #354

Open mherold opened 8 years ago

mherold commented 8 years ago

Without this fix, collection attributes can never be set to nil when coercion is enabled (because the coercer coerces nil to an empty array).

This should fix #334.

I originally suggested a change in a more central location, see this comment, but looking at the specs it seemed more appropriate to make this change only for collection attributes.

forest commented 8 years ago

:+1: