class FakeFS::Pathname
def join(*args)
path0 + path1 + ... + pathN.
path0.join(path1, ..., pathN) is the same as
Pathname#join joins pathnames.
def join(*args) args.unshift self result = args.pop result = Pathname.new(result) unless result.is_a?(Pathname) return result if result.absolute? args.reverse_each do |arg| arg = Pathname.new(arg) unless arg.is_a?(Pathname) result = arg + result return result if result.absolute? end result end