diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-17 21:36:53 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-09-17 21:36:53 +0000 |
| commit | a1582ade5e8a18e2bcfbc1dc1aeecfbf36fa79e1 (patch) | |
| tree | 7ea05881848eec78623356425e668342bf454946 /lib | |
| parent | b654f5b977bfabf81ce757b77ee170ff1039d4ba (diff) | |
| download | ruby-a1582ade5e8a18e2bcfbc1dc1aeecfbf36fa79e1.tar.gz ruby-a1582ade5e8a18e2bcfbc1dc1aeecfbf36fa79e1.tar.xz ruby-a1582ade5e8a18e2bcfbc1dc1aeecfbf36fa79e1.zip | |
* lib/mkmf.rb (rm_f, rm_rf): FileUtils.rm can take an array.
[ruby-dev:39345]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/mkmf.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb index c83b54a1a..815672b05 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -195,13 +195,13 @@ class Array end def rm_f(*files) - opt = ([files.pop] if Hash === files.last) - FileUtils.rm_f(Dir[*files], *opt) + opt = (Hash === files.last ? [files.pop] : []) + FileUtils.rm_f(Dir[*files.flatten], *opt) end def rm_rf(*files) - opt = ([files.pop] if Hash === files.last) - FileUtils.rm_rf(Dir[*files], *opt) + opt = (Hash === files.last ? [files.pop] : []) + FileUtils.rm_rf(Dir[*files.flatten], *opt) end # Returns time stamp of the +target+ file if it exists and is newer |
