diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | vm_eval.c | 3 |
2 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Sat Dec 27 18:25:09 2008 Yukihiro Matsumoto <matz@ruby-lang.org> + + * vm_eval.c (rb_f_loop): return enumerator if no block given. + [ruby-list:45747] + Sat Dec 27 17:08:43 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> * .gdbinit (dummy_gdb_enums.special_consts): forces to load debug @@ -560,8 +560,9 @@ loop_i(void) */ static VALUE -rb_f_loop(void) +rb_f_loop(VALUE self) { + RETURN_ENUMERATOR(self, 0, 0); rb_rescue2(loop_i, (VALUE)0, 0, 0, rb_eStopIteration, (VALUE)0); return Qnil; /* dummy */ } |