diff --git a/dir.c b/dir.c index 1dbedb763f..18c10f2139 100644 --- a/dir.c +++ b/dir.c @@ -858,7 +858,6 @@ dir_each_entry(VALUE dir, VALUE (*each)(VALUE, VALUE), VALUE arg, int children_o #endif path = rb_external_str_new_with_enc(name, namlen, dirp->enc); (*each)(arg, path); - if (dirp->dir == NULL) dir_closed(); } return dir; }