steveklabnik/json-merge_patch — pull request #8 by chrishunt (2013-05-21 00:38:23+00:00)
Title: Don't delete nils inside Arrays

> **Part 3**
> If the value is either a non-null JSON primitive or an Array and that member
> is currently defined within the target resource, the existing value for that
> member is to be replaced with that provided. **Any object member contained in
> the provided data whose value is explicitly null is to be treated as if the
> member were undefined**

This could go either way, but it reads to me like we want to remove `nil` *members*, but not necessarily nils inside of Arrays.

Since Arrays are replaced entirely every time we patch, nil doesn't have any special meaning inside an Array; it's just data.

Either way, [line #69](https://github.com/steveklabnik/json-merge_patch/blob/3067a80627499ffedbdf474dd1c2d62c8bd2d872/lib/json/merge_patch.rb#L69) can be deleted without failing any tests. We should modify the test in this PR to match whatever behavior we think is best. The implementation in this PR will allow nils inside Arrays.