るりまサーチ

最速Rubyリファレンスマニュアル検索!
2359件ヒット [1-100件を表示] (0.121秒)

別のキーワード

  1. openssl p
  2. openssl p=
  3. fileutils mkdir_p
  4. dsa p
  5. rsa p

キーワード

検索結果

<< 1 2 3 ... > >>

Hash#hash -> Integer (27126.0)

自身が保持するキーと値のハッシュ値を元にして算出した整数を返します。 自身が保持するキーや値が変化すればこのメソッドが返す値も変化します。

...自身が保持するキーと値のハッシュ値を元にして算出した整数を返します。
自身が保持するキーや値が変化すればこのメソッドが返す値も変化します。

//emlist[例][ruby]{
a = {}
p
a.hash #=> 0
a[1] = :x
p
a.hash #=> 329543
//}...

Proc#hash -> Integer (21126.0)

self のハッシュ値を返します。

...self のハッシュ値を返します。



P
roc オブジェクトの引数の情報を返します。

P
roc オブジェクトが引数を取らなければ空の配列を返します。引数を取る場合は、配列の配列を返し、
各配列の要素は引数の種類に対応した以...
...emlist[][ruby]{
p
rc = proc{|x, y=42, *other|}
p
prc.parameters # => x], [:opt, :y], [:rest, :other
p
rc = lambda{|x, y=42, *other|}
p
prc.parameters # => x], [:opt, :y], [:rest, :other
p
rc = proc{|x, y=42, *other|}
p
prc.parameters(lambda: true) # => x], [:opt, :y], [:rest, :other
p
rc = lambda{|x,...
...y=42, *other|}
p
prc.parameters(lambda: false) # => x], [:opt, :y], [:rest, :other
//}...

Regexp#hash -> Integer (21126.0)

正規表現のオプションやテキストに基づいたハッシュ値を返します。

...正規表現のオプションやテキストに基づいたハッシュ値を返します。

//emlist[例][ruby]{
p
/abc/i.hash # => 4893115
p
/abc/.hash # => 4856055
//}...

IPAddr#hash -> Integer (21108.0)

ハッシュ値を返します。

...ハッシュ値を返します。

@see Object#hash...

OpenStruct#hash -> Integer (21102.0)

self のハッシュ値を返します。

self のハッシュ値を返します。

絞り込み条件を変える

Pathname#hash -> Integer (21102.0)

ハッシュ値を返します。

ハッシュ値を返します。

Object#hash -> Integer (18244.0)

オブジェクトのハッシュ値を返します。このハッシュ値は、Object#eql? と合わせて Hash クラスで、2つのオブジェクトを同一のキーとするか判定するために用いられます。

...オブジェクトのハッシュ値を返します。このハッシュ値は、Object#eql? と合わせて Hash クラスで、2つのオブジェクトを同一のキーとするか判定するために用いられます。

2つのオブジェクトのハッシュ値が異なるとき、直ち...
...eql?(B) ならば A.hash == B.hash

の関係が満たされている必要があります。

ただし、ハッシュのキーとして Integer, Symbol, String などの特定の組み込みクラスが使われるときは、組込みのハッシュ関数が使用され、hash メソッドは呼...
...mlist[][ruby]{
p
self.hash #=> 2013505522753096494
p
0.hash #=> 2647535320520409998
p
0.0.hash #=> -2975129765814025835
p
nil.hash #=> 2401531420355998067

p
"ruby".hash #=> 4460896024486900438
p
"ruby".hash #=> 4460896024486900438
p
:ruby.hash #=> 3979895509189707770
p
:ruby.hash #=> 3979895...

Data#hash -> Integer (18144.0)

自身のハッシュ値を整数で返します。 Data#eql? で比較して等しいオブジェクトは同じハッシュ値を返します。

...//emlist[例][ruby]{
Dog = Data.define(:name, :age)
dog1 = Dog.new("Fred", 5)
p
dog1.hash # => -3931425561194935428
dog2 = Dog.new("Fred", 5)
p
dog2.hash # => -3931425561194935428
dog3 = Dog.new("Fred", 6)
p
dog3.hash # => -4469132459285820530
//}

[注意] 本メソッドの記述は Data のサ...
...ブクラスのインスタンスに対して呼び
出す事を想定しています。Data.define は Data のサブクラスを作成する点に
注意してください。

@see Object#hash...

Method#hash -> Integer (18132.0)

自身のハッシュ値を返します。

...自身のハッシュ値を返します。


//emlist[例][ruby]{
a = method(:==)
b = method(:eql?)
p
a.eql? b # => true
p
a.hash == b.hash # => true
p
[a, b].uniq.size # => 1
//}...

UnboundMethod#hash -> Integer (18132.0)

自身のハッシュ値を返します。

...自身のハッシュ値を返します。


//emlist[例][ruby]{
a = method(:==).unbind
b = method(:eql?).unbind
p
a.eql? b # => true
p
a.hash == b.hash # => true
p
[a, b].uniq.size # => 1
//}...

絞り込み条件を変える

<< 1 2 3 ... > >>