Don't try to close the temporary file.
[ruby-vorbistagger.git] / rake / configuretask.rb
index 2078da41a1eada92eb991b0237d91293732750c4..08a4ebc376ce76a9f9ebeaeddbc84ddc59e94dba 100644 (file)
@@ -23,7 +23,6 @@
 require "rake/tasklib"
 require "rake/clean"
 require "yaml"
-require "tempfile"
 require "fileutils"
 
 module Rake
@@ -140,16 +139,13 @@ module Rake
                        protected
                        def can_exec_binary?(bin)
                                fork do
-                                       tf = Tempfile.open("configuretask")
-                                       STDOUT.reopen(tf)
-                                       STDERR.reopen(tf)
+                                       STDOUT.reopen("/dev/null")
+                                       STDERR.reopen("/dev/null")
 
                                        begin
                                                exec(bin)
                                        rescue SystemCallError
                                                exit 255
-                                       ensure
-                                               tf.close
                                        end
                                end