class Concurrent::Map

def size

Returns:
  • (Integer) - size
def size
  count = 0
  each_pair { |k, v| count += 1 }
  count
end unless method_defined?(:size)