Sha256: df0dd65d1f00c1153f3f74edfc604789a15c0bbb452423caa3c99912533b956c
Contents?: true
Size: 242 Bytes
Versions: 8
Compression:
Stored size: 242 Bytes
Contents
# -*- coding: utf-8 -*- class Hash # Destructive elimination of nil, like Array#compact! def compact! reject! do |k, v| v.nil? end end # Intuitive, see the source. def compact dup.tap {|i| i.compact! } end end
Version data entries
8 entries across 8 versions & 1 rubygems