I'm trying to change permission on a file on a windows machine. This 
should work according to the documentation (may be i'm missing something 
here). But it doesn't
here is the code:

  # take away read permission
  new_permission = File.lstat("testfile").mode ^ 0004
  File.chmod(new_permission, "testfile" )
  File.readable?("testfile")  #=> true

or

  new_permission = File.lstat("testfile").mode ^ File::O_R
  File.chmod(new_permission, "testfile" )

What am I doing wrong?

Thanks
Apparna

-- 
Posted via http://www.ruby-forum.com/.