Skip to content

CWD is uri:classloader: then require_relative might not work #3176

@mkristian

Description

@mkristian

file test.rb:

p __FILE__
require_relative 'other'

and file other.rb:

p 123

then following fails:

$ bin/jruby -C uri:classloader:/ test.rb
"test.rb"
LoadError: no such file to load -- /home/christian/projects/active/jruby/jruby17/uri:classloader:/other
           require at org/jruby/RubyKernel.java:1040
           require at /home/christian/projects/active/jruby/jruby17/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:54
  require_relative at file:/home/christian/projects/active/jruby/jruby17/lib/jruby.jar!/jruby/kernel19/kernel.rb:24
            (root) at test.rb:2

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions