* 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:
akr 2005-05-15 15:32:35 +00:00
parent cd836a0cd2
commit cb025decff
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
Mon May 16 00:21:02 2005 Tanaka Akira <akr@m17n.org>
* 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 <m_seki@mva.biglobe.ne.jp>
* lib/drb/drb.rb (DRbObject#method_missing): use raise(exception).

View File

@ -870,7 +870,7 @@ class Pathname # * mixed *
def unlink()
begin
File.unlink @path
rescue Errno::EISDIR
rescue SystemCallError
Dir.unlink @path
end
end