# File lib/buildr/core/util.rb, line 102 def relative_path(to, from = '.') to = Pathname.new(to).cleanpath return to.to_s if from.nil? to_path = Pathname.new(File.expand_path(to.to_s, "/")) from_path = Pathname.new(File.expand_path(from.to_s, "/")) to_path.relative_path_from(from_path).to_s end