End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
YAML::DBM#reject
ydbm.reject { |key, value| ... }
lib/yaml/dbm.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.1.3/lib/yaml/dbm.rb, line 129
def reject
hsh = self.to_hash
hsh.reject { |k,v| yield k, v }
end
Converts the contents of the database to an in-memory Hash, then calls Hash#reject with the specified code block, returning a new Hash.