diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | gc.c | 3 |
2 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Fri Dec 28 13:07:31 2007 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * gc.c (os_obj_of): returns an enumerator if no block given. based on + a patch from Yugui <yugui AT yugui.sakura.ne.jp>. [ruby-dev:32828] + Fri Dec 28 11:46:04 2007 Nobuyoshi Nakada <nobu@ruby-lang.org> * tool/ytab.sed: skip yydestruct hack unless yymsg exists, for bison @@ -1798,7 +1798,7 @@ os_obj_of(VALUE of) */ static VALUE -os_each_obj(int argc, VALUE *argv) +os_each_obj(int argc, VALUE *argv, VALUE os) { VALUE of; @@ -1806,6 +1806,7 @@ os_each_obj(int argc, VALUE *argv) if (rb_scan_args(argc, argv, "01", &of) == 0) { of = 0; } + RETURN_ENUMERATOR(os, 1, &of); return os_obj_of(of); } |