Permalink
Browse files

fixed the return value of #loop (in case of break)

  • Loading branch information...
lrz committed Apr 3, 2009
1 parent a8750de commit 5c8cd3fe3ebe9163e2e84a7b2a2ccfa299d0b8cd
Showing with 1 addition and 2 deletions.
  1. +1 −2 vm_eval.c
View
@@ -269,8 +269,7 @@ loop_i(void)
static VALUE
rb_f_loop(VALUE klass, SEL sel)
{
- rb_rescue2(loop_i, (VALUE)0, 0, 0, rb_eStopIteration, (VALUE)0);
- return Qnil; /* dummy */
+ return rb_rescue2(loop_i, (VALUE)0, 0, 0, rb_eStopIteration, (VALUE)0);
}
VALUE

0 comments on commit 5c8cd3f

Please sign in to comment.