mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
* 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/trunk@8464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
cd836a0cd2
commit
cb025decff
2 changed files with 7 additions and 1 deletions
|
@ -870,7 +870,7 @@ class Pathname # * mixed *
|
|||
def unlink()
|
||||
begin
|
||||
File.unlink @path
|
||||
rescue Errno::EISDIR
|
||||
rescue SystemCallError
|
||||
Dir.unlink @path
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue