nobu
bb385e2386
* test/ruby/test_enum.rb (test_count): test for [ruby-core:24794].
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-30 07:28:03 +00:00
akr
2e70b9e70d
* enum.c (enum_slice_before): take a pattern if no block given.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-02 11:50:11 +00:00
akr
475074d5da
* enum.c (enum_chunk): new method Enumerable#chunk.
...
* enum.c (enum_slice_before): new method Enumerable#slice_before.
[ruby-dev:38392] [ruby-dev:39240]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-22 01:35:53 +00:00
matz
9ce6eb65bb
* test/ruby/test_enum.rb (TestEnumerable#each): recursive join now
...
raises ArgumentError.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-22 17:53:56 +00:00
nobu
af8f8e5b0e
* array.c (recursive_join): use obj to tell if recursion occurs.
...
[ruby-core:24150]
* enum.c (enum_join): reverted r23966. [ruby-core:24196]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-10 07:30:08 +00:00
nobu
e895bc3cdb
* enum.c (rb_enum_join): non-nil separator must be convertible to
...
String. [ruby-core:24172]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-07 04:34:34 +00:00
nobu
7c3fff4f54
* enum.c (enum_join): deals with self recursive objects to get rid
...
of infinite recursion. [ruby-core:24150]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-06 00:09:59 +00:00
mame
f725819666
* test/ruby/test_enum.rb: add some tests.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-08 16:38:33 +00:00
usa
6ff613fc09
* array.c (take_items): to_ary() raises ArgumentError if cannot to
...
convert to Array. [ruby-dev:37797]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-21 05:43:04 +00:00
nobu
cab67c3197
* array.c (take_items), enum.c (enum_zip): tries to convert to
...
array first. [ruby-core:21442]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-19 21:47:48 +00:00
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