mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 21:49:06 +02:00
Added missing block arg
This commit is contained in:
parent
59db92a1a1
commit
46ee05f05a
1 changed files with 1 additions and 1 deletions
|
@ -551,7 +551,7 @@ class Set
|
||||||
# Deletes every element of the set for which block evaluates to
|
# Deletes every element of the set for which block evaluates to
|
||||||
# false, and returns self. Returns an enumerator if no block is
|
# false, and returns self. Returns an enumerator if no block is
|
||||||
# given.
|
# given.
|
||||||
def keep_if
|
def keep_if(&block)
|
||||||
block_given? or return enum_for(__method__) { size }
|
block_given? or return enum_for(__method__) { size }
|
||||||
# Instead of directly using @hash.keep_if, perform enumeration
|
# Instead of directly using @hash.keep_if, perform enumeration
|
||||||
# using self.each that subclasses may override.
|
# using self.each that subclasses may override.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue