るりまサーチ (Ruby 3.3)

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

別のキーワード

  1. option bool
  2. socket bool
  3. win32ole vt_bool
  4. variant vt_bool
  5. bool socket

ライブラリ

検索結果

Numeric#eql?(other) -> bool (63625.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?, ...

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

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

self と other の 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::Ver...

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

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

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

@see Object#eql?

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

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

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

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

アルファベットの大文字小文字を無視して比較したい場合は
String#casecmp? を使ってくださ...

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

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

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

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

//emlist[][ruby]{
p Time.local(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 (54613.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 (54610.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

Matrix#eql?(other) -> bool (54610.0)

自分自身と other を比較し、同値であれば真(true)を返します。

自分自身と other を比較し、同値であれば真(true)を返します。

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

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

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

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

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

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

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

otherが同じパターン、オプション、文字コードの正規表現であったら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
//}

絞り込み条件を変える