るりまサーチ

最速Rubyリファレンスマニュアル検索!
41件ヒット [1-41件を表示] (0.301秒)
トップページ > クエリ:Hash[x] > クエリ:compare_by_identity[x]

別のキーワード

  1. _builtin new
  2. _builtin inspect
  3. _builtin []
  4. _builtin to_s
  5. _builtin each

ライブラリ

クラス

検索結果

Hash#compare_by_identity -> self (39131.0)

ハッシュのキーの一致判定をオブジェクトの同一性で判定するように変更します。

...}
p h1.compare_by_identity? #=> false
p h1["a"] #=> 100

h1.compare_by_identity

p h1.compare_by_identity? #=> true
p h1["a"] #=> nil # この"a"と最初の"a"とは違うオブジェクト
p h1[:c] #=> "c" # 同じ内容のシンボルはすべて同一
//}

@see Hash#compa...

Hash#compare_by_identity? -> bool (27131.0)

ハッシュがキーの一致判定をオブジェクトの同一性を用いて行っているならば真を返します。

...ハッシュがキーの一致判定をオブジェクトの同一性を用いて行っているならば真を返します。

//emlist[例][ruby]{
h1 = {}
p h1.compare_by_identity? #=> false

h1.compare_by_identity

p h1.compare_by_identity? #=> true
//}

@see Hash#compare_by_identity...

ruby 1.9 feature (120.0)

ruby 1.9 feature ruby version 1.9.0 は開発版です。 以下にあげる機能は将来削除されたり互換性のない仕様変更がなされるかもしれません。 1.9.1 以降は安定版です。 バグ修正がメインになります。

...: digest.rb
: Digest::Base.file

=== 2006-09-13

: Hash#compare_by_identity
: Hash#compare_by_identity?
: Hash#identical
: Hash#identical?

=== 2006-09-12

: Hash#compare_by_identity
: Hash#compare_by_identity?

=== 2006-09-11

: Hash#identical
: Hash#identical?

=== 2006-08-31

: Array#shuffle
: Ar...
...: いくらか obsolete な構文が除去されました
: Values はなくなりました

* その他
: 文字列のハッシュに FNV-1a hash を使用するようになりました
: Regexp#initialize でリテラルの正規表現を変更できなくなりました
: $SAFE=4 で...
...るようになりました。
この機能は実験的なものです。

x = proc {|a| p a}
(x)(7) # => 7

=== 2005-05-08

: Hash#hash [obsolete]
: Hash#eql? [obsolete]

削除

((<ruby-dev:26132>))

=== 2005-04-02

: ENV.key [new]
: ENV.index [obsolete]

((<ruby-dev:25974>))

===...

NEWS for Ruby 2.4.0 (42.0)

NEWS for Ruby 2.4.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...になりました。
half には :even, :up, :down が指定可能です。 12548 12958 12953

* Hash
* Hash#compact, Hash#compact! を追加 11818
* Hash#transform_values Hash#transform_values! を追加 12512

* Integer
* Fixnum と Bignum は Integer に統合されまし...
...tribute
value is returned. Otherwise, Nth child is returned. This is
backward compatible change.

* set
* Set#compare_by_identity, Set#compare_by_identity? を追加
12210

* webrick
* "," をクッキーの区切り文字として許可しなくなりました 12791

=...