Project

General

Profile

Bug #1665 » doc_enum187.patch

marcandre (Marc-Andre Lafortune), 06/20/2009 08:40 PM

View differences:

NEWS (working copy)
* Enumerable#minmax_by
* Enumerable#none?
* Enumerable#one?
* Enumerable#reverse_each
* Enumerable#take
* Enumerable#take_while
......
New alias to #inject.
* Enumerable#entries
* Enumerable#to_a
Now takes optional arguments to pass to #each.
* Hash#eql?
* Hash#hash
* Hash#==
enum.c (working copy)
/*
* call-seq:
* enum.to_a => array
* enum.entries => array
* enum.to_a(*args) => array
* enum.entries(*args) => array
*
* Returns an array containing the items in <i>enum</i>.
* The given <i>args</i>, if any, are passed to <code>each</code>.
*
* (1..7).to_a #=> [1, 2, 3, 4, 5, 6, 7]
* { 'a'=>1, 'b'=>2, 'c'=>3 }.to_a #=> [["a", 1], ["b", 2], ["c", 3]]
* s = StringIO.new("Hello world")
* s.to_a("l") #=> ["Hel", "l", "o worl", "d"]
*/
static VALUE
enum_to_a(argc, argv, obj)
int argc;
(2-2/3)