Project

General

Profile

Actions

Feature #11583

open

Add File#unlink

Added by ksss (Yuki Kurihara) about 9 years ago. Updated about 9 years ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:<unknown>]

Description

I propose new method File#unlink.

File#unlink is same as Fille.unlink like this.

class File
  def unlink
    File.unlink(path)
  end
end

It is more objective.
And will be able to write duck typeing with Tempfile#unlink

- Tempfile.open do |f|
+ Tempfile.create do |f|
  f.unlink # Not raise an error
end

Files

file-unlink.patch (1.44 KB) file-unlink.patch ksss (Yuki Kurihara), 10/12/2015 04:28 AM

Related issues 1 (0 open1 closed)

Related to Ruby master - Feature #11218: File.open FILE_SHARE_DELETEClosedActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0