diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-28 04:07:33 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-28 04:07:33 +0000 |
commit | 60879c868b92faebe1b144cc59d49fed8f3f0e1c (patch) | |
tree | c47dfcfbdab2c61ccab7668565578aa4b9bf15ac /gc.c | |
parent | 51e4211b87c81b6aa960a7597f04d14975b29dbc (diff) | |
download | ruby-60879c868b92faebe1b144cc59d49fed8f3f0e1c.tar.gz ruby-60879c868b92faebe1b144cc59d49fed8f3f0e1c.tar.xz ruby-60879c868b92faebe1b144cc59d49fed8f3f0e1c.zip |
* 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]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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); } |