From: Laurent Sansonetti Date: 2003-04-30T16:44:37+09:00 Subject: Re: [Q] locking in CGI script 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") => # >> 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