diff --git a/lib/rake/task_arguments.rb b/lib/rake/task_arguments.rb index 379cd2fb2..39fe3e781 100644 --- a/lib/rake/task_arguments.rb +++ b/lib/rake/task_arguments.rb @@ -64,10 +64,6 @@ def inspect def lookup(name) if @hash.has_key?(name) @hash[name] - elsif ENV.has_key?(name.to_s) - ENV[name.to_s] - elsif ENV.has_key?(name.to_s.upcase) - ENV[name.to_s.upcase] elsif @parent @parent.lookup(name) end diff --git a/test/lib/task_arguments_test.rb b/test/lib/task_arguments_test.rb index 520a16fc0..b2a1212eb 100644 --- a/test/lib/task_arguments_test.rb +++ b/test/lib/task_arguments_test.rb @@ -50,12 +50,12 @@ def test_extra_names_are_nil assert_nil ta.cc end - def test_args_can_reference_env_values + def test_args_do_not_reference_env_values ta = Rake::TaskArguments.new(["aa"], [1]) ENV['rev'] = "1.2" ENV['VER'] = "2.3" - assert_equal "1.2", ta.rev - assert_equal "2.3", ta.ver + assert_nil ta.rev + assert_nil ta.ver end def test_creating_new_argument_scopes