diff options
Diffstat (limited to 'ext/pathname/lib/pathname.rb')
-rw-r--r-- | ext/pathname/lib/pathname.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/pathname/lib/pathname.rb b/ext/pathname/lib/pathname.rb index 3baf818f08..7fb923c6ae 100644 --- a/ext/pathname/lib/pathname.rb +++ b/ext/pathname/lib/pathname.rb @@ -503,6 +503,7 @@ class Pathname # ArgumentError is raised when it cannot find a relative path. # def relative_path_from(base_directory) + base_directory = Pathname.new(base_directory) unless Pathname === base_directory dest_directory = self.cleanpath.to_s base_directory = base_directory.cleanpath.to_s dest_prefix = dest_directory |