From: "H.Yamamoto" Date: 2005-05-15T16:05:56+09:00 Subject: Re: [ ruby-Bugs-1917 ] Pathname#unlink fails on a symlink which points to a directory. >ENOTDIR is defined by POSIX. Yes, but Windows (bcc32 and mswin32) behaves differently.... E:\ruby-cvs\bcc32>irb19 irb(main):001:0> require "pathname" => true irb(main):002:0> Dir.mkdir("tmp") => 0 irb(main):003:0> Pathname.new("tmp").unlink => 0 irb(main):004:0> File.exist?("tmp") => false irb(main):005:0> open("tmp", "w"){|io| io.puts} => nil irb(main):006:0> File.exist?("tmp") => true irb(main):007:0> Pathname.new("tmp").unlink Errno::EINVAL: Invalid argument - tmp from E:/ruby-cvs/ruby/lib/pathname.rb:872:in `unlink' from E:/ruby-cvs/ruby/lib/pathname.rb:872:in `unlink' from (irb):7