From be2210bbbdccabc03c6bb6542fd1798997ced7e9 Mon Sep 17 00:00:00 2001 From: akr Date: Sun, 15 May 2005 15:32:35 +0000 Subject: * lib/pathname.rb (Pathname#unlink): use SystemCallError instead of Errno::EISDIR because EISDIR is not portable. [ruby-core:5001] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ lib/pathname.rb | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ba3820b59a..f9b5a6e21b 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:11:33 2005 Masatoshi SEKI * lib/drb/drb.rb (DRbObject#method_missing): use raise(exception). diff --git a/lib/pathname.rb b/lib/pathname.rb index bac540230f..b701a06519 100644 --- a/lib/pathname.rb +++ b/lib/pathname.rb @@ -862,7 +862,7 @@ class Pathname # * mixed * def unlink() begin File.unlink @path - rescue Errno::EISDIR + rescue SystemCallError Dir.unlink @path end end -- cgit v1.2.3