summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dir.c b/dir.c
index 719fff261cd..be3ee4247fe 100644
--- a/dir.c
+++ b/dir.c
@@ -88,7 +88,7 @@ dir_s_open(dir_class, dirname)
obj = Data_Wrap_Struct(dir_class, 0, free_dir, dirp);
if (iterator_p()) {
- rb_ensure(rb_yield, obj, dir_close, obj);
+ return rb_ensure(rb_yield, obj, dir_close, obj);
}
return obj;