Closed jewel-snake closed 4 years ago
I also have this issue.
# Compute the relative path from the 'src' path (directory) to 'tgt'
# (directory or file). Return the absolute path to 'tgt' if it can't
# be reached from 'src'.
def relative_path_from(other)
a = @path.split(SEPARATOR_PAT)
b = other.path.split(SEPARATOR_PAT)
while a.first && b.first && Pathname.pathequal(a.first, b.first)
a.shift
b.shift
end
return other if Pathname.new(b.first).absolute?
b.size.times { a.unshift '..' }
return Pathname.new(a.join('/'))
end
The relative_path_from
is getting a string and failing
Hyperbole subject. It works fine in it's intended environment.
Pathname issue fixed in fbd53dc509445313894b9b52768390bca612f2bd.
I've tried pack my ruby file with ocra but it stops every time. Terminal outputs this:
What? Ruby found error inside itself?``