Skip to content

Bug: irb_require incorrectly matches similarly named files #1252

Description

@GabrielLidenor

IRB's irb_require command can incorrectly treat a file as already loaded when another file with a similar name has been loaded.

For example, after loading foo2.rb, running:

irb_require "foo"

Expected behavior

irb_require "foo" should load foo.rb even when foo2.rb has already been loaded.

Actual behavior

irb_require "foo" is treated as already loaded because foo2.rb is considered a match.

Reproduction

  1. Create foo.rb and foo2.rb.
  2. Run irb_require "foo2".
  3. Run irb_require "foo".
  4. Observe that foo.rb is not loaded.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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