From d44d45450fc52176c043cd35116d628e2646e797 Mon Sep 17 00:00:00 2001 From: aamine Date: Thu, 11 Dec 2003 11:54:50 +0000 Subject: [PATCH] * 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@5170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 +++++++ lib/fileutils.rb | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ab8eb5f209..24d1d4602f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Thu Dec 11 20:54:28 2003 Minero Aoki + + * 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 * lib/ftools.rb (makedirs): sync with fileutils. diff --git a/lib/fileutils.rb b/lib/fileutils.rb index d9eba19314..deba1c8fda 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, '') }.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)