Sha256: d65e045cc2cc01642603736826fd49ce6fd991879ff4520e6d953dd013b15ab9
Contents?: true
Size: 347 Bytes
Versions: 17
Compression:
Stored size: 347 Bytes
Contents
class Hash # Iterates through each pair and updates a the hash # in place. This is formally equivalent to #mash! # But does not use #mash to accomplish the task. # Hence #update_each is probably a touch faster. # # CREDIT: Trans def update_each # :yield: dup.each do |k,v| update(yield(k,v)) end self end end
Version data entries
17 entries across 16 versions & 1 rubygems