autoload failure with relative paths
% cat foo.rb
% cat run.rb
dir = File.dirname(File.expand_path(FILE))
$LOAD_PATH.unshift(dir + '/../' + File.basename(dir))
autoload :Foo, 'foo'
% ruby -v run.rb
ruby 1.9.2p180 (2011-02-18 revision 30907) [i386-darwin9.8.0]
/Users/jlawrence/tmp/foo.rb:1: warning: loading in progress, circular require considered harmful - /Users/jlawrence/tmp/foo.rb
<top (required)>': uninitialized constant Foo (NameError)'
Commit r30789 on trunk fixes this problem (with no conflicts).
Updated by yugui (Yuki Sonoda) about 8 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100