зеркало из https://github.com/github/ruby.git
Document limitation of Pathname#relative_path_from [ci skip]
This method is explicitly documented to not access the filesystem, and the only way to get the correct behavior for a case where the filesystem's case sensitivity differs from the operating system default would be to access the filesystem. Fixes [Bug #15417]
This commit is contained in:
Родитель
93b78abd77
Коммит
cc5b7ed1dc
|
@ -502,6 +502,9 @@ class Pathname
|
|||
#
|
||||
# ArgumentError is raised when it cannot find a relative path.
|
||||
#
|
||||
# Note that this method does not handle situations where the case sensitivity
|
||||
# of the filesystem in use differs from the operating system default.
|
||||
#
|
||||
def relative_path_from(base_directory)
|
||||
base_directory = Pathname.new(base_directory) unless base_directory.is_a? Pathname
|
||||
dest_directory = self.cleanpath.to_s
|
||||
|
|
Загрузка…
Ссылка в новой задаче