instance method
Pathname#delete
() -> ::Integer
delete
pathname_builtin.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/pathname_builtin.rb, line 1153
def unlink()
Dir.unlink @path
rescue Errno::ENOTDIR
File.unlink @path
end
Alias of #unlink
Removes a file or directory, using File.unlink or Dir.unlink as necessary.