summaryrefslogtreecommitdiff
path: root/lib/mkmf.rb
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-05 09:39:28 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-05 09:39:28 +0000
commit636840b3fa8b1630b76a9f5b92a4a48bd2b4d252 (patch)
tree02709a2dc296856a0692b9932cd01be5b1a1ce51 /lib/mkmf.rb
parent35d36573c359d2f3ac8a28e41e8945e4289f7c2f (diff)
merges r24620 from trunk into ruby_1_9_1. fixes the backport task #1976.
-- * lib/mkmf.rb (rm_f, rm_rf): pass the last hash through if exists. [ruby-dev:39153] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@26009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/mkmf.rb')
-rw-r--r--lib/mkmf.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 5a2d67f12b..06aeca96bd 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -191,11 +191,13 @@ class Array
end
def rm_f(*files)
- FileUtils.rm_f(Dir[*files.flatten(1)])
+ opt = ([files.pop] if Hash === files.last)
+ FileUtils.rm_f(Dir[*files.flatten(1)], *opt)
end
def rm_rf(*files)
- FileUtils.rm_rf(Dir[*files.flatten(1)])
+ opt = ([files.pop] if Hash === files.last)
+ FileUtils.rm_rf(Dir[*files.flatten(1)], *opt)
end
# Returns time stamp of the +target+ file if it exists and is newer