зеркало из https://github.com/github/ruby.git
* lib/pathname.rb (Pathname#unlink): unlink a symlink to a directory
was failed. [ruby-core:4992] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
c23d3e4640
Коммит
eebb06165f
|
@ -1,3 +1,8 @@
|
|||
Sun May 15 14:35:46 2005 Tanaka Akira <akr@m17n.org>
|
||||
|
||||
* lib/pathname.rb (Pathname#unlink): unlink a symlink to a directory
|
||||
was failed. [ruby-core:4992]
|
||||
|
||||
Sun May 15 09:57:30 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* win32/win32.c (unixtime_to_filetime): deal with DST.
|
||||
|
|
|
@ -868,10 +868,10 @@ class Pathname # * mixed *
|
|||
# Removes a file or directory, using <tt>File.unlink</tt> or
|
||||
# <tt>Dir.unlink</tt> as necessary.
|
||||
def unlink()
|
||||
if FileTest.directory? @path
|
||||
Dir.unlink @path
|
||||
else
|
||||
begin
|
||||
File.unlink @path
|
||||
rescue Errno::EISDIR
|
||||
Dir.unlink @path
|
||||
end
|
||||
end
|
||||
alias delete unlink
|
||||
|
|
Загрузка…
Ссылка в новой задаче