Issue #4712 has been reported by Roger Pack.

----------------------------------------
Bug #4712: File.writable? inaccurate in windows
http://redmine.ruby-lang.org/issues/4712

Author: Roger Pack
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: ruby 1.9.2p180 (2011-02-18) [i386-mingw32]


Hello. Here's what happens (when a user doesn't have admin privileges in windows 7):

c:\Program Files (x86)\NetBeans 6.9.1>irb --simple-prompt
>> File.writable?('.')
=> true
>> File.writable?('./uninstall.exe')
=> true
>> File.open('./uninstall.exe', 'wb')
Errno::EACCES: Permission denied - ./uninstall.exe
        from (irb):4:in `initialize'
        from (irb):4:in `open'
        from (irb):4

So I think writable was returning true in error here.
Cheers!
-r


-- 
http://redmine.ruby-lang.org