compact!()
public
static VALUE
rb_hash_compact_bang(VALUE hash)
{
rb_hash_modify_check(hash);
if (RHASH(hash)->ntbl) {
st_index_t n = RHASH(hash)->ntbl->num_entries;
rb_hash_foreach(hash, delete_if_nil, hash);
if (n != RHASH(hash)->ntbl->num_entries)
return hash;
}
return Qnil;
}