summaryrefslogtreecommitdiff
path: root/struct.c
diff options
context:
space:
mode:
Diffstat (limited to 'struct.c')
-rw-r--r--struct.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/struct.c b/struct.c
index 0a0f217547..f3b8279213 100644
--- a/struct.c
+++ b/struct.c
@@ -774,6 +774,7 @@ rb_struct_select(int argc, VALUE *argv, VALUE s)
if (argc > 0) {
rb_raise(rb_eArgError, "wrong number of arguments (%d for 0)", argc);
}
+ RETURN_ENUMERATOR(s, 0, 0);
result = rb_ary_new();
for (i = 0; i < RSTRUCT_LEN(s); i++) {
if (RTEST(rb_yield(RSTRUCT_PTR(s)[i]))) {