Sha256: de27fd782872b2e9876ed516f8b2910e8bf22c3ccacceb1d4e8760339b3e5014

Contents?: true

Size: 503 Bytes

Versions: 11

Compression:

Stored size: 503 Bytes

Contents

# frozen_string_literal: true

File.singleton_class.prepend (Module.new do
  # NOTE: see https://github.com/jruby/jruby/issues/7750
  def absolute_path path, dir = nil
    return super unless dir && !(absolute_path? path)
    super File.join dir, path
  end

  # NOTE: JRuby < 9.4 doesn't implement this method; JRuby 9.4 implements it incorrectly
  def absolute_path? path
    (Pathname.new path).absolute? && !(%r/\A[[:alpha:]][[:alnum:]\-+]*:\/\/\S/.match? path)
  end
end) if RUBY_ENGINE == 'jruby'

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
asciidoctor-pdf-2.3.19 lib/asciidoctor/pdf/ext/core/file.rb
asciidoctor-pdf-2.3.18 lib/asciidoctor/pdf/ext/core/file.rb
asciidoctor-pdf-2.3.17 lib/asciidoctor/pdf/ext/core/file.rb
asciidoctor-pdf-2.3.16 lib/asciidoctor/pdf/ext/core/file.rb
asciidoctor-pdf-2.3.15 lib/asciidoctor/pdf/ext/core/file.rb
asciidoctor-pdf-2.3.14 lib/asciidoctor/pdf/ext/core/file.rb
asciidoctor-pdf-2.3.13 lib/asciidoctor/pdf/ext/core/file.rb
asciidoctor-pdf-2.3.12 lib/asciidoctor/pdf/ext/core/file.rb
asciidoctor-pdf-2.3.11 lib/asciidoctor/pdf/ext/core/file.rb
asciidoctor-pdf-2.3.10 lib/asciidoctor/pdf/ext/core/file.rb
asciidoctor-pdf-2.3.9 lib/asciidoctor/pdf/ext/core/file.rb