summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/pathname.rb2
1 files changed, 1 insertions, 1 deletions
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