Skip to content

Commit

Permalink
remove unlink dead alias (#6036)
Browse files Browse the repository at this point in the history
  • Loading branch information
esse authored and RX14 committed May 1, 2018
1 parent b10197a commit fe871e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
4 changes: 2 additions & 2 deletions spec/std/process_spec.cr
Expand Up @@ -192,7 +192,7 @@ describe Process do
it "executes the new process with exec" do
tmpfile = Tempfile.new("crystal-spec-exec")
tmpfile.close
tmpfile.unlink
tmpfile.delete
File.exists?(tmpfile.path).should be_false

fork = Process.fork do
Expand All @@ -201,7 +201,7 @@ describe Process do
fork.wait

File.exists?(tmpfile.path).should be_true
tmpfile.unlink
tmpfile.delete
ensure
File.delete(tmpfile.path) if tmpfile && File.exists?(tmpfile.path)
end
Expand Down
7 changes: 1 addition & 6 deletions src/tempfile.cr
Expand Up @@ -29,7 +29,7 @@ require "c/stdlib"
#
# ```
# tempfile = Tempfile.new("foo")
# tempfile.unlink
# tempfile.delete
# ```
#
# The optional `extension` argument can be used to force the resulting filename
Expand Down Expand Up @@ -105,9 +105,4 @@ class Tempfile < File
def delete
File.delete(@path)
end

# ditto
def unlink
delete
end
end

0 comments on commit fe871e1

Please sign in to comment.