diff options
Diffstat (limited to 'lib/set.rb')
-rw-r--r-- | lib/set.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/set.rb b/lib/set.rb index 4f925e3ec6..4668b4e24a 100644 --- a/lib/set.rb +++ b/lib/set.rb @@ -272,6 +272,8 @@ class Set # true, and returns self. def delete_if block_given? or return enum_for(__method__) + # @hash.delete_if should be faster, but using it breaks the order + # of enumeration in subclasses. select(&proc).each(&@hash.method(:delete)) self end @@ -280,6 +282,8 @@ class Set # false, and returns self. def keep_if block_given? or return enum_for(__method__) + # @hash.keep_if should be faster, but using it breaks the order of + # enumeration in subclasses. reject(&proc).each(&@hash.method(:delete)) self end |