mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* vm_eval.c (rb_f_loop): return enumerator if no block given.
[ruby-list:45747] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d9be2059e5
commit
10af217ff3
2 changed files with 7 additions and 1 deletions
|
|
@ -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 */
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue