class RSpec::Matchers::BuiltIn::ChangeDetails

def changed?

def changed?
  # Consider it changed if either:
  #
  # - The before/after values are unequal
  # - The before/after values have different hash values
  #
  # The latter case specifically handles the case when the value proc
  # returns the exact same object, but it has been mutated.
  #
  # Note that it is not sufficient to only check the hashes; it is
  # possible for two values to be unequal (and of different classes)
  # but to return the same hash value. Also, some objects may change
  # their hash after being compared with `==`/`!=`.
  @actual_before != @actual_after || @before_hash != @actual_hash
end