diff --git a/ChangeLog b/ChangeLog index f6658c0d02..7fc2b422c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Mon May 16 00:21:02 2005 Tanaka Akira + + * lib/pathname.rb (Pathname#unlink): use SystemCallError instead of + Errno::EISDIR because EISDIR is not portable. + [ruby-core:5001] + Sun May 15 22:28:10 2005 Masatoshi SEKI * lib/drb/drb.rb (DRbObject#method_missing): use raise(exception). diff --git a/lib/pathname.rb b/lib/pathname.rb index 83f517d49e..99261ca9d9 100644 --- a/lib/pathname.rb +++ b/lib/pathname.rb @@ -870,7 +870,7 @@ class Pathname # * mixed * def unlink() begin File.unlink @path - rescue Errno::EISDIR + rescue SystemCallError Dir.unlink @path end end