close()
public
Closes the directory stream. Calling this method on closed Dir object is ignored since Ruby 2.3.
d = Dir.new("testdir")
d.close
Show source
static VALUE
dir_close(VALUE dir)
{
struct dir_data *dirp;
dirp = dir_get(dir);
if (!dirp->dir) return Qnil;
closedir(dirp->dir);
dirp->dir = NULL;
return Qnil;
}