[MacRuby] #846: Can't load the file when the file and the directory of the same name exist in load-path.

MacRuby ruby-noreply at macosforge.org
Wed Aug 11 00:06:06 PDT 2010


#846: Can't load the file when the file and the directory of the same name exist
in load-path.
----------------------------------+-----------------------------------------
 Reporter:  watson1978@…          |       Owner:  lsansonetti@…        
     Type:  defect                |      Status:  new                  
 Priority:  blocker               |   Milestone:                       
Component:  MacRuby               |    Keywords:                       
----------------------------------+-----------------------------------------
 Test Script:
 {{{
 #!ruby
 $ cat test.rb
 %w[a a/foo b].each {|d| Dir.mkdir(d)}
 open("b/foo", "w") {|f| f.puts "$ok = :ok"}

 $:.replace(%w[a b])

 begin
   load "foo"
   p $ok
 rescue => e
   p e
 end

 # finalize
 File.delete("b/foo")
 %w[a/foo a b].each {|d| Dir.rmdir(d)}
 }}}

 Result of Ruby 1.9.1:
 {{{
 $ ruby test.rb
 :ok
 }}}

 Result of MacRuby Trunk:
 {{{
 $ macruby test.rb
 #<Errno::EISDIR: Is a directory - read() failed>
 }}}

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



More information about the macruby-tickets mailing list