[Rubygems-developers] LoadError in nested require causes silent failure
Eric Hodel
drbrain at segment7.net
Mon Jan 29 16:16:11 EST 2007
On Jan 29, 2007, at 12:13, Peter Marklund wrote:
> Without RubyGems an exception is thrown on the first invocation of
> require, but not the second:
>
> require File.join(File.dirname(__FILE__), "test_help")
> LoadError: no such file to load -- b
> from ./test_help.rb:1:in `require'
> from ./test_help.rb:1
> from (irb):1
> irb(main):002:0> require File.join(File.dirname(__FILE__),
> "test_help")
> => false
>
> I hope this illustrates the issue that I am getting at. RubyGems
> cannot know that the LoadError exception refers to the path of the
> require, it can refer to a nested require. When the second
> invocation of __require in RubyGems require method returns false,
> should RubyGems maybe issue a warning?
If you can reprudce this without Rails, please file a bug.
More information about the Rubygems-developers
mailing list