Sha256: 28de56f6ae93d1c51b374d7b25b78d31937d935ef1c1f5421272e3b808b7563c

Contents?: true

Size: 448 Bytes

Versions: 47

Compression:

Stored size: 448 Bytes

Contents

if RUBY_VERSION < '1.9'
  require 'backports/tools/path'

  class << File
    def expand_path_with_potential_to_path(file, dir = nil)
      raise ArgumentError, 'home not set' if file == '~' && ENV["HOME"] == ''
      expand_path_without_potential_to_path(
        Backports.convert_path(file),
        dir == nil ? dir : Backports.convert_path(dir)
      )
    end
    Backports.alias_method_chain self, :expand_path, :potential_to_path
  end
end

Version data entries

47 entries across 47 versions & 4 rubygems

Version Path
backports-3.25.0 lib/backports/1.9.1/file/expand_path.rb
backports-3.24.1 lib/backports/1.9.1/file/expand_path.rb
backports-3.24.0 lib/backports/1.9.1/file/expand_path.rb
backports-3.23.0 lib/backports/1.9.1/file/expand_path.rb
backports-3.22.1 lib/backports/1.9.1/file/expand_path.rb
backports-3.22.0 lib/backports/1.9.1/file/expand_path.rb
backports-3.21.0 lib/backports/1.9.1/file/expand_path.rb
backports-3.20.2 lib/backports/1.9.1/file/expand_path.rb
backports-3.20.1 lib/backports/1.9.1/file/expand_path.rb
backports-3.20.0 lib/backports/1.9.1/file/expand_path.rb
backports-3.19.0 lib/backports/1.9.1/file/expand_path.rb
backports-3.18.2 lib/backports/1.9.1/file/expand_path.rb
backports-3.18.1 lib/backports/1.9.1/file/expand_path.rb
backports-3.18.0 lib/backports/1.9.1/file/expand_path.rb
files.com-1.0.55 docs/vendor/bundle/ruby/2.5.0/gems/backports-3.12.0/lib/backports/1.9.1/file/expand_path.rb
backports-3.17.2 lib/backports/1.9.1/file/expand_path.rb
backports-3.17.1 lib/backports/1.9.1/file/expand_path.rb
backports-3.17.0 lib/backports/1.9.1/file/expand_path.rb
backports-3.16.1 lib/backports/1.9.1/file/expand_path.rb
backports-3.16.0 lib/backports/1.9.1/file/expand_path.rb