Issue #6587 has been reported by usa (Usaku NAKAMURA).

----------------------------------------
Feature #6587: proposal: adding new methods File.rootname and Pathname#rootname
https://bugs.ruby-lang.org/issues/6587

Author: usa (Usaku NAKAMURA)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 2.0.0


??????大好?? Unixen ?????????????? '/' ?????????????????????????????????????????????????Windows ?????????????????????? UNC ???????????????????????????????????????????????????????????????????????????????????????
Ruby ??????????????? UNC ???????????????????????????????????????????????????念?????????????????????????????????????????????????????????????????????????????????
??????? ruby ???????? test/ 以??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????UNC ?????張???????(???????????????????????????????????????????????????"//?/" ???????????? "//./" ??????????????)?????????????????????????????????????????????????????

??????????dirname???basename???extname ?????????????????rootname ?????????????????? File ???????????????????? Pathname ???????????????追??????????????????????????????

: File.rootname(filename) -> String
  filename ??????????????????????????????????????????????????????????????????????????????????
  filename ?????対?????????????? ""(空??????)??????????????
   # on Unixen
   p File.rootname("/foo/bar.txt") #=> "/" (absolute path)
   p File.rootname("bar.txt")      #=> ""  (relative path)

   # on Windows
   p File.rootname("/foo/bar.txt")         #=> "" (relative path)
   p File.rootname("bar.txt")              #=> "" (relative path)
   p File.rootname("C:/foo/bar.txt")       #=> "C:/" (normal absolute path)
   p File.rootname("C:bar.txt")            #=> "" (relative path)
   p File.rootname("//host/share/baz.txt") #=> "//host/share" (UNC absolute path)
   p File.rootname("//?/C:/foo/bar.txt")   #=> "//?/C:/" (extended form absolute path)

: Pathname#rootname
  Pathname.new(File.rootname(self.to_s)) ??????????????


-- 
http://bugs.ruby-lang.org/