+
Skip to content

File.absolute_path returns absolute path for relative classpath:uri #8981

@headius

Description

@headius

Discovered while working on specs in #8980 and adding spec:jruby run to macos.

File.absolute_path appears to absolutize a relative classpath:uri: path on macos but apparently not on Linux. This leads to a failure in spec:jruby:

1) File#absolute_path should return itself for 'classpath:uri:/'
   Failure/Error: DEFAULT_FAILURE_NOTIFIER = lambda { |failure, _opts| raise failure }
   
     expected: "classpath:uri:/home/me"
          got: "classpath:uri:/System/Volumes/Data/home/me"
   
     (compared using ==)
   # ./spec/jruby/core/file/absolute_path_spec.rb:19:in `block in <main>'
   # ./spec/jruby/core/file/absolute_path_spec.rb:18:in `block in <main>'

This does not appear to be related to the breakage reported in #8973 or the fixes for it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载