[MacRuby] #1389: If autoload with "./", can't delete autoload target information after require.

MacRuby ruby-noreply at macosforge.org
Sun Sep 18 17:31:40 PDT 2011


#1389: If autoload with "./", can't delete autoload target information after
require.
------------------------------+---------------------------------------------
 Reporter:  kouji@…           |       Owner:  lsansonetti@…        
     Type:  defect            |      Status:  new                  
 Priority:  major             |   Milestone:                       
Component:  MacRuby           |    Keywords:  autoload             
------------------------------+---------------------------------------------
 Reduction below.
 {{{
 --- a.rb ---
 open("zzz.rb", "w") {|f| f.puts "class ZZZ; def self.ok;:ok;end;end"}
 autoload :ZZZ, "./zzz.rb"
 require "./zzz.rb"
 p ZZZ.ok

 --- result ---
 $ env DYLD_LIBRARY_PATH=/Users/kouji/work/MacRuby/MacRuby ./macruby a.rb
 /Users/kouji/work/MacRuby/MacRuby/zzz.rb:1:in `<main>': uninitialized
 constant ZZZ (NameError)
         from /Users/kouji/work/MacRuby/MacRuby/a.rb:3:in `<main>'
 }}}

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/1389>
MacRuby <http://macruby.org/>



More information about the macruby-tickets mailing list