Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

Do not modify Vagrant core object #135

Merged
merged 1 commit into from
Jan 15, 2015
Merged

Do not modify Vagrant core object #135

merged 1 commit into from
Jan 15, 2015

Conversation

c10l
Copy link
Contributor

@c10l c10l commented Dec 25, 2014

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 c10l/vagrant-butcher#57. The problem with keep_if was identified by @sethvargo on this issue: hashicorp/vagrant#5060 (comment)

Using [Array#keep_if](http://www.ruby-doc.org/core-1.9.3/Array.html#method-i-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 c10l/vagrant-butcher#57. The problem with `keep_if` was identified by @sethvargo on this issue: hashicorp/vagrant#5060 (comment)
@sethvargo
Copy link

👍

@fgrehm
Copy link
Owner

fgrehm commented Dec 26, 2014

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 😁

@fgrehm fgrehm merged commit c6d4e57 into fgrehm:master Jan 15, 2015
@fgrehm
Copy link
Owner

fgrehm commented Jan 15, 2015

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants