summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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