Permalink
Browse files

super should be returned when not lazy

  • Loading branch information...
1 parent 4af0b46 commit 7aa30fefa3c07d58fd001db2238a9c5e9a70a62e @gregolsen committed Feb 26, 2012
Showing with 4 additions and 6 deletions.
  1. +4 −6 enumerator.c
View
@@ -451,11 +451,10 @@ enumerator_map(VALUE obj)
entry->proc = rb_block_proc();
entry->type = T_PROC_MAP;
rb_ary_push(e->procs, entry_obj);
+ return obj;
} else {
- rb_call_super(0, 0);
+ return rb_call_super(0, 0);
}
-
- return obj;
}
static VALUE
@@ -471,11 +470,10 @@ enumerator_select(VALUE obj)
entry->proc = rb_block_proc();
entry->type = T_PROC_SELECT;
rb_ary_push(e->procs, entry_obj);
+ return obj;
} else {
- rb_call_super(0, 0);
+ return rb_call_super(0, 0);
}
-
- return obj;
}
/*

0 comments on commit 7aa30fe

Please sign in to comment.