method
delete
ruby latest stable - Class:
Pathname
delete()public
Removes a file or directory, using File.unlink if self is a file, or Dir.unlink as necessary.
static VALUE
path_unlink(VALUE self)
{
VALUE eENOTDIR = rb_const_get_at(rb_mErrno, id_ENOTDIR);
VALUE str = get_strpath(self);
return rb_rescue2(unlink_body, str, unlink_rescue, str, eENOTDIR, (VALUE)0);
}