summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-09-25 08:49:17 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-09-25 08:49:17 +0000
commit7a51e3d0edfd8808f0fd8e709303cc694d8967e2 (patch)
treee5ca92b63d92ba85e3b9bc64dab8faa0c6122dc4 /lib
parent73cd3df3cbd260aeff851ec2c07553f1d351109d (diff)
downloadruby-7a51e3d0edfd8808f0fd8e709303cc694d8967e2.tar.gz
ruby-7a51e3d0edfd8808f0fd8e709303cc694d8967e2.tar.xz
ruby-7a51e3d0edfd8808f0fd8e709303cc694d8967e2.zip
* lib/mkmf.rb (libpathflag): restore ENV['LIB'] when some error occured.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/mkmf.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 04e6acdb6..f27a7faf2 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -211,8 +211,11 @@ end
def libpathflag
if $mswin
ENV['LIB'] = ($LIBPATH + [ORIG_LIBPATH]).join(';')
- yield ""
- ENV['LIB'] = ORIG_LIBPATH
+ begin
+ yield ""
+ ensure
+ ENV['LIB'] = ORIG_LIBPATH
+ end
else
yield $LIBPATH.map{|x| %Q[#{LIBPATHFLAG}"#{x}"]}.join
end