diff options
author | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-11 11:54:50 +0000 |
---|---|---|
committer | aamine <aamine@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-11 11:54:50 +0000 |
commit | 12f16d0df3109142f6de9284487dab6a86bdd337 (patch) | |
tree | f3f76a7ccce6c94fdeb042c1345d506493eb6850 | |
parent | ae62f01e6c454daea76b6128c07d10a4b951c418 (diff) | |
download | ruby-12f16d0df3109142f6de9284487dab6a86bdd337.tar.gz ruby-12f16d0df3109142f6de9284487dab6a86bdd337.tar.xz ruby-12f16d0df3109142f6de9284487dab6a86bdd337.zip |
* lib/fileutils.rb (mkdir_p): remove trailing `/' befere mkdir(2). mkdir("nonexistdir/") does not work on NetBSD/Alpha 1.6.1.
* lib/fileutils.rb (fu_list): call to_str for all arguments.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | lib/fileutils.rb | 4 |
2 files changed, 9 insertions, 2 deletions
@@ -1,3 +1,10 @@ +Thu Dec 11 20:54:28 2003 Minero Aoki <aamine@loveruby.net> + + * lib/fileutils.rb (mkdir_p): remove trailing `/' befere mkdir(2). + mkdir("nonexistdir/") does not work on NetBSD/Alpha 1.6.1. + + * lib/fileutils.rb (fu_list): call to_str for all arguments. + Thu Dec 11 20:07:01 2003 WATANABE Hirofumi <eban@ruby-lang.org> * lib/ftools.rb (makedirs): sync with fileutils. diff --git a/lib/fileutils.rb b/lib/fileutils.rb index d9eba1931..deba1c8fd 100644 --- a/lib/fileutils.rb +++ b/lib/fileutils.rb @@ -170,7 +170,7 @@ module FileUtils return *list if options[:noop] mode = options[:mode] || (0777 & ~File.umask) - list.each do |path| + list.map {|path| path.sub(%r</\z>, '') }.each do |path| stack = [] until path == stack.last # dirname("/")=="/", dirname("C:/")=="C:/" stack.push path @@ -711,7 +711,7 @@ module FileUtils end def fu_list(arg) - arg.is_a?(Array) ? arg : [arg] + Array(arg).map {|path| path.to_str } end def fu_each_src_dest(src, dest) |