lib/build/files/path.rb in build-files-1.5.0 vs lib/build/files/path.rb in build-files-1.6.0

- old
+ new

@@ -171,15 +171,15 @@ def self.join(root, relative_path) self.new(File.join(root, relative_path), root) end - # Expand a subpath within a given root, similar to `File.expand_path` - def self.expand(subpath, root = Dir.getwd) - if subpath.start_with? File::SEPARATOR - self.new(subpath) + # Expand a path within a given root. + def self.expand(path, root = Dir.getwd) + if path.start_with?(File::SEPARATOR) + self.new(path) else - self.join(root, subpath) + self.join(root, path) end end def shortest_path(root) self.class.shortest_path(self, root)