method
del_trailing_separator
v2_1_10 -
Show latest stable
- Class:
Pathname
del_trailing_separator(path)private
No documentation available.
# File ext/pathname/lib/pathname.rb, line 146
def del_trailing_separator(path) # :nodoc:
if r = chop_basename(path)
pre, basename = r
pre + basename
elsif /#{SEPARATOR_PAT}+\z/ =~ path
$` + File.dirname(path)[/#{SEPARATOR_PAT}*\z/]
else
path
end
end