Issue #11583 has been reported by Yuki Kurihara.

----------------------------------------
Feature #11583: Add File#unlink
https://bugs.ruby-lang.org/issues/11583

* Author: Yuki Kurihara
* Status: Open
* Priority: Normal
* Assignee: 
----------------------------------------
I propose new method **File#unlink**.

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

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

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

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

---Files--------------------------------
file-unlink.patch (1.44 KB)


-- 
https://bugs.ruby-lang.org/