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

Do not modify Vagrant core object - #135

Merged
fgrehm merged 1 commit into
fgrehm:masterfrom
c10l:patch-1
Jan 15, 2015
Merged

Do not modify Vagrant core object#135
fgrehm merged 1 commit into
fgrehm:masterfrom
c10l:patch-1

Conversation

@c10l

@c10l c10l commented Dec 25, 2014

Copy link
Copy Markdown
Contributor

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
Copy Markdown

👍

@fgrehm

fgrehm commented Dec 26, 2014

Copy link
Copy Markdown
Owner

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

fgrehm commented Jan 15, 2015

Copy link
Copy Markdown
Owner

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