るりまサーチ

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

別のキーワード

  1. _builtin ==
  2. openssl ==
  3. rexml/document ==
  4. matrix ==
  5. == _builtin

ライブラリ

キーワード

検索結果

<< 1 2 > >>

Numeric#eql?(other) -> bool (21129.0)

自身と other のクラスが等しくかつ == メソッドで比較して等しい場合に true を返します。 そうでない場合に false を返します。

...自身と other のクラスが等しくかつ == メソッドで比較して等しい場合に true を返します。
そうでない場合に false を返します。

N
umeric のサブクラスは、eql? で比較して等しい数値同士が同じハッシュ値を返すように
hash メソ...
...ッドを適切に定義する必要があります。

@param other 自身と比較したい数値を指定します。

//emlist[例][ruby]{
p 1.eql?(1) #=> true
p 1.eql?(1.0) #=> false
p 1 == 1.0 #=> true
//}

@see Object#equal?, Object#eql?, Object#==, Object#===...

Pathname#eql?(other) -> bool (21119.0)

パス名を比較し、 other と同じなら真を返します。大文字小文字は区別されます。 other は Pathname オブジェクトでなければなりません。

...other は Pathname オブジェクトでなければなりません。

パス名の比較は単純にパス文字列の比較によって行われるので、論理的に
同じパスでもパス文字列が違えば異なると判断されます。

@param other 比較対象の Pathname オブジ...
...ェクトを指定します。

//emlist[例][ruby]{
require 'pathname'

p Pathname.new("foo/bar") == Pathname.new("foo/bar")
p Pathname.new("foo/bar") == Pathname.new("foo//bar")
p Pathname.new("foo/../foo/bar") == Pathname.new("foo/bar")

# => true
# false
# false
//}...

Fiddle::Pointer#eql?(other) -> bool (21113.0)

ポインタの指すアドレスが同一ならばtrueを返します。

...タの指すアドレスが同一ならばtrueを返します。

@param other 比較対象の Pointer オブジェクト

例:

require 'fiddle'

s = 'abc'
cptr = Fiddle::Pointer[s]
cptr0 = Fiddle::Pointer[s]
cptr1 = cptr + 1

p cptr == cptr1 #=> false
p cptr == cptr0 #=> true...

Gem::Version#eql?(other) -> bool (21113.0)

self と other の Gem::Version#version のバージョンが等しいとき true を返します。 そうでなければ false を返します。

...の Gem::Version#version のバージョンが等しいとき true を返します。
そうでなければ false を返します。

Comparable を include して作られた == と異なり、"1.0" と "1" は異なるものと判定します。

//emlist[][ruby]{
ver0 = Gem::Version.create('1.0')...
...# #<Gem::Version "1.0">
ver1 = Gem::Version.create('1.0') # #<Gem::Version "1.0">
ver2 = Gem::Version.create('1') # #<Gem::Version "1">

p ver0.eql?(ver1) # => true
p ver1.eql?(ver2) # => false
p ver1 == ver2 # => true
//}...

UnboundMethod#eql?(other) -> bool (21113.0)

自身と other が同じクラスあるいは同じモジュールの同じメソッドを表す場合に true を返します。そうでない場合に false を返します。

...@param other 自身と比較したいオブジェクトを指定します。

//emlist[例][ruby]{
a = String.instance_method(:size)
b = String.instance_method(:size)
p a == b #=> true

c = Array.instance_method(:size)
p a == c #=> false
//}...

絞り込み条件を変える

Bignum#eql?(other) -> bool (21107.0)

self と other のクラスが等しくかつ同じ値である場合に true を返します。 そうでない場合に false を返します。

...self と other のクラスが等しくかつ同じ値である場合に true を返します。
そうでない場合に false を返します。

@param other self と比較したい数値。

(1 << 64) == (1 << 64).to_f # => true
(1 << 64).eql?((1 << 64).to_f) # => false...

OpenSSL::BN#eql?(other) -> bool (21101.0)

自身と other が等しい場合に true を返します。

自身と other が等しい場合に true を返します。

@param other 比較する数

OpenSSL::PKey::EC::Group#eql?(other) -> bool (21101.0)

自身が other と等しいときは true を返します。

...自身が other と等しいときは true を返します。

@param other 比較対象の OpenSSL::PKey::EC::Group オブジェクト...

OpenSSL::PKey::EC::Point#eql?(other) -> bool (21101.0)

自身が other と等しいならば true を返します。

...自身が other と等しいならば true を返します。

@raise OpenSSL::PKey::EC::Point::Error エラーが生じた場合に発生します...

String#hash -> Integer (3123.0)

self のハッシュ値を返します。 eql? で等しい文字列は、常にハッシュ値も等しくなります。

...self のハッシュ値を返します。
eql?
で等しい文字列は、常にハッシュ値も等しくなります。

//emlist[例][ruby]{
"test".hash # => 4038258770210371295
("te" + "st").hash == "test".hash # => true
//}

@see Hash...

絞り込み条件を変える

<< 1 2 > >>