Skip to content

The File#absolute_path? implementation in JRuby 9.4.x.x causes issues with *asciidoctor-pdf* #7744

@sschuberth

Description

@sschuberth

Looks like the File#absolute_path? implementation added in 42a2ab9 causes issues:

@JRubyMethod(name = "absolute_path?", required = 1, meta = true)
public static IRubyObject absolute_path_p(ThreadContext context, IRubyObject recv, IRubyObject arg) {
RubyString file = get_path(context, arg);
// asJavaString should be ok here since windows drive shares will be charset representable and otherwise we look for "/" at front.
return context.runtime.newBoolean(isAbsolutePath(file.asJavaString()));
}

I'm cross-posting this from asciidoctor/asciidoctor-pdf#2383 to raise awareness that some (valid?) assumptions of asciidoctor-pdf about how File#absolute_path? relates to Pathname#absolute? do not seem to hold anymore as of JRuby 9.4.x.x, and seem to not be in line with CRuby, see asciidoctor/asciidoctor-pdf#2383 (comment) and following.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions