hash -> Integer[permalink][rdoc][edit]-
self のハッシュ値を返します。 eql? で等しい文字列は、常にハッシュ値も等しくなります。
例p "test".hash # => 4038258770210371295 p ("te" + "st").hash == "test".hash # => true[SEE_ALSO] Hash
このマニュアルは既にメンテナンスが終了したバージョンの Ruby を対象としています。 最新版のマニュアルへ
hash -> Integer[permalink][rdoc][edit]self のハッシュ値を返します。 eql? で等しい文字列は、常にハッシュ値も等しくなります。
例p "test".hash # => 4038258770210371295
p ("te" + "st").hash == "test".hash # => true
[SEE_ALSO] Hash