Hello,

kwatch wrote:

> A method File#flock() is available on Windows?
> I wonder it may be available only on *nix.
> 

It seems that the File#flock method is weirdly implemented on Windows:

Z:\>irb --simple-prompt
 >> f = File.open("testfile")
=> #<File:0x2a4b030>
 >> f.flock(File::LOCK_EX|File::LOCK_NB)
=> 0
 >> f.flock(File::LOCK_EX|File::LOCK_NB)
Errno::ENOENT: No such file or directory - "testfile"
         from (irb):3:in `flock'
         from (irb):3
 >>

According to pickaxe, Ruby should return 'false' for the second flock() 
call.

Z:\>ruby -v
ruby 1.6.8 (2002-12-24) [i586-mswin32]

-- 
Laurent