From b1bdada158244e16bab6456e68b39ce48a2a2f58 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 22 Mar 2012 02:17:26 +0000 Subject: remove conftest files * lib/mkmf.rb (try_constant): remove conftest files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35100 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/mkmf.rb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'lib/mkmf.rb') diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 9f31166b5f..231091ee48 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -631,10 +631,14 @@ SRC int conftest_const = (int)(#{const}); int main() {printf("%d\\n", conftest_const); return 0;} } - if try_link0(src, opt, &b) - xpopen("./conftest") do |f| - return Integer(f.gets) - end + begin + if try_link0(src, opt, &b) + xpopen("./conftest") do |f| + return Integer(f.gets) + end + end + ensure + MakeMakefile.rm_f "conftest*" end end nil -- cgit v1.2.3