From: Jeremy Kemper Date: 2009-02-01T03:28:59+09:00 Subject: [ruby-core:21696] [Bug #1079] failed autoload hangs the interpreter Bug #1079: failed autoload hangs the interpreter http://redmine.ruby-lang.org/issues/show/1079 Author: Jeremy Kemper Status: Open, Priority: Normal Target version: 1.9.1 Reproducible Version: trunk, ruby -v: ruby 1.9.1p5000 (2009-01-31 trunk 21909) [i386-darwin9.6.0] # foo.rb module Foo; end # 1.8.7 >> module Bar; autoload :Foo, 'foo' end => nil >> Bar::Foo NameError: uninitialized constant Bar::Foo from (irb):3 # 1.9.1 >> module Bar; autoload :Foo, 'foo' end => nil >> Bar::Foo ... (gdb) run -e "module Bar; autoload :Foo, 'foo' end; puts Bar::Foo" Starting program: /usr/local/ruby/1.9-trunk/bin/ruby -e "module Bar; autoload :Foo, 'foo' end; puts Bar::Foo" Reading symbols for shared libraries +++... done Reading symbols for shared libraries . done Reading symbols for shared libraries . done ^C Program received signal SIGINT, Interrupt. file_expand_path (fname=2076620, dname=4, abs_mode=, result=4183520) at file.c:2734 2734 --p; (gdb) bt #0 file_expand_path (fname=2076620, dname=4, abs_mode=, result=4183520) at file.c:2734 #1 0x00032e1d in rb_get_expanded_load_path () at load.c:44 #2 0x00033380 in rb_feature_p (feature=0x1f84dc "foo", ext=0x1f84df "", rb=2, expanded=0, fn=0xbfffee48) at load.c:147 #3 0x000336a7 in rb_feature_provided (feature=0x1f84dc "foo", loading=0xbfffee48) at load.c:236 #4 0x000f0a47 in autoload_provided (arg=12787716) at variable.c:1396 #5 0x00030bf9 in rb_ensure (b_proc=0xf0a30 , data1=3221220936, e_proc=0xf0a50 , data2=0) at eval.c:671 #6 0x000f0b67 in autoload_node (mod=, id=, noload=0) at variable.c:1429 #7 0x000f0bb3 in rb_autoload_load (klass=12787716, id=2354069) at variable.c:1442 #8 0x000f2839 in rb_const_get_0 (klass=2065720, id=3221220936, exclude=2, recurse=2) at variable.c:1475 #9 0x0010eebf in vm_exec_core (th=0x200740, initial=) at vm_insnhelper.c:1123 #10 0x001124bb in vm_exec (th=0x200740) at vm.c:1078 #11 0x001126cf in rb_iseq_eval_main (iseqval=2066680) at vm.c:1294 #12 0x000304a9 in ruby_exec_node (n=0x1f88f8, file=0x0) at eval.c:204 #13 0x00032b2e in ruby_run_node (n=0x1f88f8) at eval.c:232 #14 0x0000252f in main (argc=3, argv=0x200540) at main.c:35 ---------------------------------------- http://redmine.ruby-lang.org