Method: Weak::Map#freeze

Defined in:
lib/weak/map.rb

#freezeself

Set objects can't be frozen since this is not enforced by the underlying ObjectSpace::WeakMap implementation. Thus, we try to signal this by not actually setting the frozen? flag and ignoring attempts to freeze us with just a warning.

Returns:

  • (self)

465
466
467
468
# File 'lib/weak/map.rb', line 465

def freeze
  warn("Can't freeze #{self.class}")
  self
end