Skip to content

Commit 79930dd

Browse files
committed
pathname: Use add_trailing_separator
1 parent ca3432c commit 79930dd

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

pathname_builtin.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,9 +323,7 @@ def prepend_prefix(prefix, relpath) # :nodoc:
323323
if relpath.empty?
324324
File.dirname(prefix)
325325
elsif has_separator?(prefix)
326-
prefix = File.dirname(prefix)
327-
prefix = File.join(prefix, "") if File.basename(prefix + 'a') != 'a'
328-
prefix + relpath
326+
add_trailing_separator(File.dirname(prefix)) + relpath
329327
else
330328
prefix + relpath
331329
end

0 commit comments

Comments
 (0)