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:
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
- Create foo.rb and foo2.rb.
- Run irb_require "foo2".
- Run irb_require "foo".
- Observe that foo.rb is not loaded.
IRB's
irb_requirecommand 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:Expected behavior
irb_require"foo" should loadfoo.rbeven whenfoo2.rbhas already been loaded.Actual behavior
irb_require"foo" is treated as already loaded becausefoo2.rbis considered a match.Reproduction