summaryrefslogtreecommitdiff
path: root/enumerator.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-20 06:52:29 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-20 06:52:29 +0000
commitcc659d2f1b120fda6b085a7a51ac4115397bf9ef (patch)
tree38c2079f0d9fea985015fa30b9318687be7789ad /enumerator.c
parentc0debb96b65e4a53bf79b6245a98c055db0c0924 (diff)
* enum.c (enum_slice_when): New method: Enumerable#slice_when.
(slicewhen_i): New function. (slicewhen_ii): New function. * enumerator.c (InitVM_Enumerator): New method: Enumerator::Lazy#slice_when. [ruby-core:62499] [Feature #9826] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enumerator.c')
-rw-r--r--enumerator.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/enumerator.c b/enumerator.c
index eaa3d73..75de8eb 100644
--- a/enumerator.c
+++ b/enumerator.c
@@ -2040,6 +2040,7 @@ InitVM_Enumerator(void)
rb_define_method(rb_cLazy, "chunk", lazy_super, -1);
rb_define_method(rb_cLazy, "slice_before", lazy_super, -1);
rb_define_method(rb_cLazy, "slice_after", lazy_super, -1);
+ rb_define_method(rb_cLazy, "slice_when", lazy_super, -1);
rb_define_alias(rb_cLazy, "force", "to_a");