るりまサーチ

最速Rubyリファレンスマニュアル検索!
238件ヒット [1-100件を表示] (0.262秒)
トップページ > クエリ:-[x] > クエリ:E[x] > クエリ:I[x] > クエリ:eql?[x]

別のキーワード

  1. open3 popen2e
  2. socket af_e164
  3. matrix det_e
  4. matrix rank_e
  5. open3 capture2e

検索結果

<< 1 2 3 > >>

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

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

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

Numeric のサブクラスは、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#===...

Bignum#eql?(other) -> bool (27300.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...

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

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

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

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

//emlist[][ruby]{
ver0 = Gem::Versio...
...n.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
//}...

IPAddr#eql?(other) -> bool (27300.0)

自身が other と等しい場合は真を返します。 そうでない場合は偽を返します。

...自身が other と等しい場合は真を返します。
そうでない場合は偽を返します。

@see Object#eql?...

String#eql?(other) -> bool (27300.0)

文字列の内容が文字列 other の内容と等しいときに true を返します。 等しくなければ false を返します。

...字列 other の内容と等しいときに true を返します。
等しくなければ false を返します。

このメソッドは文字列の内容を比較します。
同一のオブジェクトかどうかを比較するわけではありません。
つまり、"string".eql?(str) とい...
...string" という内容の文字列でありさえすれば常に true を返します。
同一のオブジェクトであるかどうかを判定したいときは
Object#equal? を使ってください。

アルファベットの大文字小文字を無視して比較したい場合は、String#...
...case,
String#downcase で大文字小文字を揃えてから比較してください。

Hash クラス内での比較に使われます。

@param other 任意のオブジェクト
@return true か false

//emlist[例][ruby]{
p "string".eql?("string") # => true
p "string".eql?("STRING"...
...ring" という内容の文字列でありさえすれば常に true を返します。
同一のオブジェクトであるかどうかを判定したいときは
Object#equal? を使ってください。

アルファベットの大文字小文字を無視して比較したい場合は
String#case...
...@param other 任意のオブジェクト
@return true か false

//emlist[例][ruby]{
p "string".eql?("string") # => true
p "string".eql?("STRING") # => false
p "string".eql?("") # => false
p "".eql?("string") # => false

p "string".eql?("str" + "ing") # => true (内...

絞り込み条件を変える

Time#eql?(other) -> bool (27300.0)

other が Time かそのサブクラスのインスタンスであり自身と時刻が等しい場合に true を返します。そうでない場合に false を返します。

...other が Time かそのサブクラスのインスタンスであり自身と時刻が等しい場合に
true を返します。そうでない場合に false を返します。

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

//emlist[][ruby]{
p Time.lo...
...cal(2000, 1, 1).eql?(Time.local(2000, 1, 1)) # => true
p Time.local(2000, 1, 1).eql?(Time.local(2000, 1, 2)) # => false
//}...

BigDecimal#eql?(other) -> bool (24300.0)

self が other と等しい場合に true を、そうでない場合に false を返します。

...self が other と等しい場合に true を、そうでない場合に false を返します。

それぞれの値は BigDecimal#coerce で変換して比較される場合があります。

//emlist[][ruby]{
require 'bigdecimal'
BigDecimal('1.0') == 1.0 # => true
//}...

Fiddle::Pointer#eql?(other) -> bool (24300.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...

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

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

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

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

Regexp#eql?(other) -> bool (21312.0)

otherが同じパターン、オプション、文字コードの正規表現であったらtrueを返します。

...erが同じパターン、オプション、文字コードの正規表現であったらtrueを返します。

@param other 正規表現を指定します。

//emlist[例][ruby]{
p /^eee$/ == /~eee$/x # => false
p /^eee$/ == /~eee$/i # => false
p /^eee$/e == /~eee$/u # => false
p /^eee...
...$/ == Regexp.new("^eee$") # => true
p /^eee$/.eql?(/^eee$/) # => true
//}...

絞り込み条件を変える

<< 1 2 3 > >>