From 1ae1b85e81bcfa1742e7d6fd5d02c0b11f1170ce Mon Sep 17 00:00:00 2001 From: zzak Date: Thu, 13 Sep 2012 18:32:07 +0000 Subject: * array.c (rb_ary_select): Update documentation for Array#select * enum.c (enum_find_all, enum_reject): Update documentation for Enumerable#find_all and Enumerable#reject Based on a patch by Jeff Saracco [Bug #6908] [ruby-core:47285] [Fixes #166 on github] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- array.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'array.c') diff --git a/array.c b/array.c index 524553a119..273768fbd1 100644 --- a/array.c +++ b/array.c @@ -2408,16 +2408,17 @@ rb_ary_values_at(int argc, VALUE *argv, VALUE ary) * ary.select { |item| block } -> new_ary * ary.select -> Enumerator * - * Invokes the given block passing in successive elements from +self+, - * returning an array containing those elements for which the block returns - * a +true+ value. - * - * See also Enumerable#select. + * Returns a new array containing all elements of +ary+ + * for which the given +block+ returns a true value. * * If no block is given, an Enumerator is returned instead. * + * [1,2,3,4,5].select { |num| num.even? } #=> [2, 4] + * * a = %w{ a b c d e f } * a.select { |v| v =~ /[aeiou]/ } #=> ["a", "e"] + * + * See also Enumerable#select. */ static VALUE -- cgit v1.2.3