diff --git a/lib/vagrant/action/builder.rb b/lib/vagrant/action/builder.rb index fdd7d9a6e..00743e8b5 100644 --- a/lib/vagrant/action/builder.rb +++ b/lib/vagrant/action/builder.rb @@ -32,11 +32,6 @@ module Vagrant # # @param [Class] middleware The middleware class def use(middleware, *args, &block) - # Prepend with a environment setter if args are given - if !args.empty? && args.first.is_a?(Hash) && middleware != Env::Set - self.use(Env::Set, args.shift, &block) - end - if middleware.kind_of?(Builder) # Merge in the other builder's stack into our own self.stack.concat(middleware.stack) diff --git a/test/unit/vagrant/action/builder_test.rb b/test/unit/vagrant/action/builder_test.rb index 046166cfa..411f22b99 100644 --- a/test/unit/vagrant/action/builder_test.rb +++ b/test/unit/vagrant/action/builder_test.rb @@ -50,18 +50,6 @@ describe Vagrant::Action::Builder do two.call(data) data[:one].should == true end - - it "should be able to set additional variables when using" do - data = { } - proc1 = Proc.new { |env| env[:data] += 1 } - - # Build the first builder - one = described_class.new - one.use proc1, :data => 5 - one.call(data) - - data[:data].should == 6 - end end context "inserting" do