Skip to content

require_relative with Named Pipe Gives Incorrect Error #6286

@aryeh-looker

Description

@aryeh-looker

Environment Information

$ ruby --version
jruby 9.2.9.0 (2.5.7) 2019-10-30 458ad3e OpenJDK 64-Bit Server VM 25.181-b01 on 1.8.0_181-google-v7-313002728-313002728 +jit [linux-x86_64]

Expected Behavior

via MRI:

$ ruby << EOF
require_relative '../util'
EOF
Traceback (most recent call last):
        1: from -:1:in `<main>'
-:1:in `require_relative': cannot infer basepath (LoadError)

Actual Behavior

via JRuby

$ ruby << EOF
> require_relative '../util'
> EOF
Errno::ENOENT: No such file or directory - /usr/local/home/aryeh/test/-
          realpath at org/jruby/RubyFile.java:903
  require_relative at org/jruby/RubyKernel.java:1001
            <main> at -:1

An error with MRI and JRuby, but the MRI error is helpful for resolving the issue in question via StackOverflow, etc (is "googleable").

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