fgrehm / vagrant-cachier

Caffeine reducer
http://fgrehm.viewdocs.io/vagrant-cachier
MIT License
1.08k stars 111 forks source link

Do not modify Vagrant core object #135

Closed c10l closed 9 years ago

c10l commented 9 years ago

Using Array#keep_if on a Vagrant core object can lead to unpredictable behaviour down the line as it modifies the object instead of creating a new one.

An example of such interference is described on https://github.com/cassianoleal/vagrant-butcher/issues/57. The problem with keep_if was identified by @sethvargo on this issue: https://github.com/mitchellh/vagrant/issues/5060#issuecomment-68107995

sethvargo commented 9 years ago

:+1:

fgrehm commented 9 years ago

This LGTM but I'll hold back on merging since I'm on vacations away from a computer and wont be able to cut a release.

I think there are other contributors around with permission to merge this PR and push a new release to rubygems. If not I'll take care of that when I'm back.

Thanks a lot for the patch and sorry for the upcoming silence :grin:

fgrehm commented 9 years ago

Thanks and sorry it took so long! The 1.2.0 version of the plugin will come out with this in a few ;-)