Module: JSI::Util::Private::FingerprintHash::Immutable Private
- Includes:
- JSI::Util::Private::FingerprintHash
- Defined in:
- lib/jsi/util/private.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?) private
- #freeze ⇒ Object private
- #hash ⇒ Object private
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
162 163 164 165 166 167 168 169 |
# File 'lib/jsi/util/private.rb', line 162 def ==(other) return true if __id__ == other.__id__ return false unless other.is_a?(FingerprintHash) # FingerprintHash::Immutable#hash being memoized, comparing that is basically free. # not done with FingerprintHash, its #hash can be expensive. return false if other.is_a?(FingerprintHash::Immutable) && hash != other.hash jsi_fingerprint == other.jsi_fingerprint end |
#freeze ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
177 178 179 180 |
# File 'lib/jsi/util/private.rb', line 177 def freeze hash super end |
#hash ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
173 174 175 |
# File 'lib/jsi/util/private.rb', line 173 def hash @jsi_fingerprint_hash ||= jsi_fingerprint.hash end |