From dd6a75195a635abfcfdb8ac5df26885e91708908 Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Fri, 17 Sep 2021 12:12:08 -0700 Subject: [ruby/pathname] Make Pathname#each_entry return enumerator if called without block Fixes [Bug #18158] https://github.com/ruby/pathname/commit/914c726aa2 --- ext/pathname/pathname.c | 1 + 1 file changed, 1 insertion(+) (limited to 'ext/pathname/pathname.c') diff --git a/ext/pathname/pathname.c b/ext/pathname/pathname.c index 1d4ed2814b..00ca85205b 100644 --- a/ext/pathname/pathname.c +++ b/ext/pathname/pathname.c @@ -1274,6 +1274,7 @@ static VALUE path_each_entry(VALUE self) { VALUE args[1]; + RETURN_ENUMERATOR(self, 0, 0); args[0] = get_strpath(self); return rb_block_call(rb_cDir, id_foreach, 1, args, each_entry_i, rb_obj_class(self)); -- cgit v1.2.3