Le 8/6/2005, "Kirill A. Shutemov" <k.shutemov / sam-solutions.net> a
˝─rit:
>I think this is bug:
>
>irb(main):001:0> File.open("test.rb","w"){|file|
>irb(main):002:1* file << "Const = 1"
>irb(main):003:1> }
>=> #<File:test.rb (closed)>
>irb(main):004:0> require 'test.rb'
>=> true
>irb(main):005:0> require './test.rb'
>./test.rb:1: warning: already initialized constant Const
>=> true
>
>require loads twice same file. I think to $" should add absolute path not
>relative. What do you think?

Yes, and just the equivalent of File.expand_path in
#require would work fine, I presume.

>Kirill A. Shutemov

E

--
template<typename duck>
void quack(duck& d) { d.quack(); }