1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* enumerator.c (InitVM_Enumerator): renamed Enumerable::Lazy to

Enumerator::Lazy.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
shugo 2012-03-15 08:47:09 +00:00
parent 4a1db362f0
commit ff1f6107f9
3 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,8 @@
Thu Mar 15 17:45:27 2012 Shugo Maeda <shugo@ruby-lang.org>
* enumerator.c (InitVM_Enumerator): renamed Enumerable::Lazy to
Enumerator::Lazy.
Thu Mar 15 16:37:38 2012 Shugo Maeda <shugo@ruby-lang.org> Thu Mar 15 16:37:38 2012 Shugo Maeda <shugo@ruby-lang.org>
* enumerator.c (enumerator_lazy): added cycle to the documentation. * enumerator.c (enumerator_lazy): added cycle to the documentation.

View file

@ -1624,7 +1624,7 @@ InitVM_Enumerator(void)
rb_define_method(rb_cEnumerator, "inspect", enumerator_inspect, 0); rb_define_method(rb_cEnumerator, "inspect", enumerator_inspect, 0);
/* Enumerable::Lazy */ /* Enumerable::Lazy */
rb_cLazy = rb_define_class_under(rb_mEnumerable, "Lazy", rb_cEnumerator); rb_cLazy = rb_define_class_under(rb_cEnumerator, "Lazy", rb_cEnumerator);
rb_define_method(rb_mEnumerable, "lazy", enumerable_lazy, 0); rb_define_method(rb_mEnumerable, "lazy", enumerable_lazy, 0);
rb_define_method(rb_cLazy, "initialize", lazy_initialize, -1); rb_define_method(rb_cLazy, "initialize", lazy_initialize, -1);
rb_define_method(rb_cLazy, "map", lazy_map, 0); rb_define_method(rb_cLazy, "map", lazy_map, 0);

View file

@ -19,7 +19,7 @@ class TestLazyEnumerator < Test::Unit::TestCase
def test_initialize def test_initialize
assert_equal([1, 2, 3], [1, 2, 3].lazy.to_a) assert_equal([1, 2, 3], [1, 2, 3].lazy.to_a)
assert_equal([1, 2, 3], Enumerable::Lazy.new([1, 2, 3]).to_a) assert_equal([1, 2, 3], Enumerator::Lazy.new([1, 2, 3]).to_a)
end end
def test_each_args def test_each_args