summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hash.c11
1 files changed, 6 insertions, 5 deletions
@@ -2779,14 +2779,15 @@ keep_if_i(VALUE key, VALUE value, VALUE hash)
* select {|key, value| ... } -> new_hash
* select -> new_enumerator
*
- * Returns a new +Hash+ object whose entries are those for which the block returns a truthy value:
* h = {foo: 0, bar: 1, baz: 2}
* h.select {|key, value| value < 2 } # => {foo: 0, bar: 1}
*
- * Returns a new Enumerator if no block given:
- * h = {foo: 0, bar: 1, baz: 2}
- * e = h.select # => #<Enumerator: {foo: 0, bar: 1, baz: 2}:select>
- * e.each {|key, value| value < 2 } # => {foo: 0, bar: 1}
*/
static VALUE