summaryrefslogtreecommitdiff
path: root/lib/mkmf.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-22 02:17:26 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-03-22 02:17:26 +0000
commitb1bdada158244e16bab6456e68b39ce48a2a2f58 (patch)
tree972de62e350d78a32b37c1b8a86080fd3a8a8c3d /lib/mkmf.rb
parent99594056559c13e2b5653a94ea6ef1fe85c4057b (diff)
downloadruby-b1bdada158244e16bab6456e68b39ce48a2a2f58.tar.gz
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
Diffstat (limited to 'lib/mkmf.rb')
-rw-r--r--lib/mkmf.rb12
1 files changed, 8 insertions, 4 deletions
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