lib/core/facets/file/rootname.rb in facets-2.9.3 vs lib/core/facets/file/rootname.rb in facets-3.0.0
- old
+ new
@@ -11,10 +11,10 @@
#
def self.rootname(path)
# -- this should be fairly robust
path_re = Regexp.new('[' + Regexp.escape(File::Separator + %q{\/}) + ']')
- head, tail = path.split(path_re, 2)
+ head, _ = path.split(path_re, 2)
return '.' if path == head
return '/' if head.empty?
return head
end