kernel/common/array.rb
# Removes all nil elements from self, returns nil if no changes
Removes all nil elements from self, returns nil if no changes
Removes all nil elements from self returns nil if no changes
def compact!()
    if((deleted = @tuple.delete(@start,@total,nil)) > 0)
      @total -= deleted
      reallocate_shrink()
      return self
    else
      return nil
    end
  end
def compact! ( ) if ( ( deleted = @tuple . delete ( @start , @total , nil ) ) > 0 ) @total -= deleted reallocate_shrink ( ) return self else return nil end end
Removes all nil elements from self, returns nil if no changes
Removes all nil elements from self returns nil if no changes