summaryrefslogtreecommitdiff
path: root/enum.c
diff options
context:
space:
mode:
authormarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-05 03:49:59 +0000
committermarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-02-05 03:49:59 +0000
commit1677cbce9d7c72cca83d1b7d48cb85a17e74abcc (patch)
treecc1dd1c678470e3c26343e054f5443ff1eac77bb /enum.c
parent44cd5f21e9d06ccc09ba8e12fb53d64f0df059a3 (diff)
* enumerator.c: Use to_enum for Enumerable methods returning Enumerators.
This makes Lazy#cycle no longer needed, so it was removed. Make Enumerator#chunk and slice_before return lazy Enumerators. [Bug #7715] * internal.h: Remove ref to rb_enum_cycle_size; no longer needed * enum.c: Make enum_cycle_size static. * test/ruby/test_lazy_enumerator.rb: Test for above git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enum.c')
-rw-r--r--enum.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/enum.c b/enum.c
index db1609e..a07fbdb 100644
--- a/enum.c
+++ b/enum.c
@@ -2238,9 +2238,8 @@ cycle_i(VALUE i, VALUE ary, int argc, VALUE *argv)
return Qnil;
}
-#define enum_cycle_size rb_enum_cycle_size
-VALUE
-rb_enum_cycle_size(VALUE self, VALUE args)
+static VALUE
+enum_cycle_size(VALUE self, VALUE args)
{
long mul;
VALUE n = Qnil;