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

5 commits

Author SHA1 Message Date
knu
2e24863549 * test/ruby/test_enum.rb (TestEnumerable#test_each_with_object):
Add a test for Enumerable#each_with_object.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-26 10:28:57 +00:00
knu
3a3e250975 * enum.c (enum_count, count_all_i, Init_Enumerable),
array.c (rb_ary_count): If no argument or block is given, count
  the number of all elements.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-29 19:18:54 +00:00
knu
033a32b4c1 * enum.c (enum_find_index): Add support for find_index(obj);
[ruby-dev:34313].

* array.c (rb_ary_index): Define find_index as an alias to index.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-11 07:58:06 +00:00
mame
9a5fd6098d * test/ruby/test_bignum.rb: suppress warnings during test.
* test/ruby/test_enum.rb: ditto.
* test/ruby/test_integer.rb: add tests to achieve over 90% test coverage of
  numeric.c.
* test/ruby/test_float.rb: ditto.
* test/ruby/test_fixnum.rb: ditto.
* test/ruby/test_numeric.rb: ditto.
* test/ruby/test_pack.rb: add tests to achieve over 90% test coverage of
  pack.c.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-31 14:08:14 +00:00
mame
7390164a64 * test/ruby/test_enumerator.rb: add tests to achieve over 90% test
coverage of enumerator.c.
* test/ruby/test_enum.rb: add for enum.c.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-29 13:59:13 +00:00