Skip to content

Commit

Permalink
* lib/fileutils.rb (mkdir_p): remove trailing `/' befere mkdir(2). mk…
Browse files Browse the repository at this point in the history
…dir("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
  • Loading branch information
aamine committed Dec 11, 2003
1 parent aa0e949 commit 1dc822f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/fileutils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def mkdir_p(list, options = {})
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
Expand Down Expand Up @@ -711,7 +711,7 @@ def fu_check_options(options, *optdecl)
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)
Expand Down

0 comments on commit 1dc822f

Please sign in to comment.