aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-28 04:07:33 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-28 04:07:33 +0000
commit0d7405b69fe5f39108ed665429737b3438f979c8 (patch)
treec47dfcfbdab2c61ccab7668565578aa4b9bf15ac
parent76e845505a7a4e57152475097a521acda36fdcf0 (diff)
downloadruby-0d7405b69fe5f39108ed665429737b3438f979c8.tar.gz
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@14751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--gc.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index eae84c2c59..6e15a1d29b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/gc.c b/gc.c
index 3a71af2926..f8acf9b173 100644
--- a/gc.c
+++ b/gc.c
@@ -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);
}