diff --git a/bin/ocran b/bin/ocran index 5fc3620..fb62e3a 100644 --- a/bin/ocran +++ b/bin/ocran @@ -64,17 +64,7 @@ module Ocran other = Pathname.new(other) unless other.is_a?(Pathname) return other if drive_letter?&.casecmp(other.drive_letter?) != 0 - if absolute? != other.absolute? - raise ArgumentError, "both paths must be either absolute or relative" - end - a = to_s.split(Pathname::SEPARATOR_PAT) - b = other.to_s.split(Pathname::SEPARATOR_PAT) - while a.first && b.first && pathequal(a.first, b.first) - a.shift - b.shift - end - b.size.times { a.unshift ".." } - Pathname.new(File.join(*a)) + super end # Determines if 'src' is contained in 'tgt' (i.e. it is a subpath of @@ -111,8 +101,6 @@ module Ocran end end - ::Pathname.prepend(RefinePathname) - IGNORE_MODULE_NAMES = /\A(enumerator.so|rational.so|complex.so|fiber.so|thread.rb|ruby2_keywords.rb)\z/ GEM_SCRIPT_RE = /\.rbw?$/ @@ -634,6 +622,7 @@ EOF end def Ocran.build_exe + ::Pathname.prepend(RefinePathname) all_load_paths = $LOAD_PATH.map { |loadpath| Pathname(loadpath).expand_path } @added_load_paths = ($LOAD_PATH - @load_path_before).map { |loadpath| Pathname(loadpath).expand_path } working_directory = Pathname.pwd