ruby/ruby — pull request #319 by komamitsu (2013-05-28 15:19:32+00:00)
Title: fix FileUtils.mkdir('/')

FileUtils.mkdir and mkdir_p can't handle root directory, so I fixed them.

$ ruby -rfileutils -e 'FileUtils.mkdir("/")'
/Users/komamitsu/.rbenv/versions/1.9.3-p392/lib/ruby/1.9.1/fileutils.rb:247:in `mkdir': No such file or directory - (Errno::ENOENT)
from /Users/komamitsu/.rbenv/versions/1.9.3-p392/lib/ruby/1.9.1/fileutils.rb:247:in `fu_mkdir'
from /Users/komamitsu/.rbenv/versions/1.9.3-p392/lib/ruby/1.9.1/fileutils.rb:176:in `block in mkdir'
from /Users/komamitsu/.rbenv/versions/1.9.3-p392/lib/ruby/1.9.1/fileutils.rb:175:in `each'
from /Users/komamitsu/.rbenv/versions/1.9.3-p392/lib/ruby/1.9.1/fileutils.rb:175:in `mkdir'
from -e:1:in `

'
$ ruby -rfileutils -e 'FileUtils.mkdir_p("/")'
/Users/komamitsu/.rbenv/versions/1.9.3-p392/lib/ruby/1.9.1/fileutils.rb:247:in `mkdir': No such file or directory - (Errno::ENOENT)
from /Users/komamitsu/.rbenv/versions/1.9.3-p392/lib/ruby/1.9.1/fileutils.rb:247:in `fu_mkdir'
from /Users/komamitsu/.rbenv/versions/1.9.3-p392/lib/ruby/1.9.1/fileutils.rb:221:in `block (2 levels) in mkdir_p'
from /Users/komamitsu/.rbenv/versions/1.9.3-p392/lib/ruby/1.9.1/fileutils.rb:219:in `reverse_each'
from /Users/komamitsu/.rbenv/versions/1.9.3-p392/lib/ruby/1.9.1/fileutils.rb:219:in `block in mkdir_p'
from /Users/komamitsu/.rbenv/versions/1.9.3-p392/lib/ruby/1.9.1/fileutils.rb:205:in `each'
from /Users/komamitsu/.rbenv/versions/1.9.3-p392/lib/ruby/1.9.1/fileutils.rb:205:in `mkdir_p'
from -e:1:in `

'