diff options
| -rw-r--r-- | hash.c | 16 |
1 files changed, 6 insertions, 10 deletions
@@ -3039,23 +3039,19 @@ each_value_i(VALUE key, VALUE value, VALUE _) * each_value {|value| ... } -> self * each_value -> new_enumerator * - * Calls the given block with each value; returns +self+: + * With a block given, calls the block with each value; returns +self+: + * * h = {foo: 0, bar: 1, baz: 2} * h.each_value {|value| puts value } # => {foo: 0, bar: 1, baz: 2} - * Output: - * 0 - * 1 - * 2 * - * Returns a new Enumerator if no block given: - * h = {foo: 0, bar: 1, baz: 2} - * e = h.each_value # => #<Enumerator: {foo: 0, bar: 1, baz: 2}:each_value> - * h1 = e.each {|value| puts value } - * h1 # => {foo: 0, bar: 1, baz: 2} * Output: * 0 * 1 * 2 + * + * With no block given, returns a new Enumerator. + * + * Related: see {Methods for Iterating}[rdoc-ref:Hash@Methods+for+Iterating]. */ static VALUE |
