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.
164 165 166 167 168 169 170 171 |
# File 'lib/jsi/util/private.rb', line 164 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.
179 180 181 182 |
# File 'lib/jsi/util/private.rb', line 179 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.
175 176 177 |
# File 'lib/jsi/util/private.rb', line 175 def hash @jsi_fingerprint_hash ||= jsi_fingerprint.hash end |