[前][次][番号順一覧][スレッド一覧]

ruby-changes:9555

From: matz <ko1@a...>
Date: Sat, 27 Dec 2008 18:28:40 +0900 (JST)
Subject: [ruby-changes:9555] Ruby:r21095 (trunk): * vm_eval.c (rb_f_loop): return enumerator if no block given.

matz	2008-12-27 18:28:26 +0900 (Sat, 27 Dec 2008)

  New Revision: 21095

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=21095

  Log:
    * vm_eval.c (rb_f_loop): return enumerator if no block given.
      [ruby-list:45747]

  Modified files:
    trunk/ChangeLog
    trunk/vm_eval.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 21094)
+++ ChangeLog	(revision 21095)
@@ -1,3 +1,8 @@
+Sat Dec 27 18:25:09 2008  Yukihiro Matsumoto  <matz@r...>
+
+	* 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@r...>
 
 	* .gdbinit (dummy_gdb_enums.special_consts): forces to load debug
Index: vm_eval.c
===================================================================
--- vm_eval.c	(revision 21094)
+++ vm_eval.c	(revision 21095)
@@ -560,8 +560,9 @@
  */
 
 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 */
 }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]