るりまサーチ

最速Rubyリファレンスマニュアル検索!
1311件ヒット [301-400件を表示] (0.111秒)
トップページ > クエリ:l[x] > クエリ:bool[x] > クエリ:==[x]

別のキーワード

  1. kernel $-l
  2. matrix l
  3. _builtin $-l
  4. lupdecomposition l
  5. l matrix

ライブラリ

モジュール

キーワード

検索結果

<< < ... 2 3 4 5 6 ... > >>

Pathname#==(other) -> bool (18321.0)

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

...の 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
//}...

Random#==(other) -> bool (18319.0)

乱数生成器が等しい状態であるならばtrue を返します。

...乱数生成器が等しい状態であるならばtrue を返します。

@param other 比較対象の乱数生成器


//emlist[例][ruby]{
r1 = Random.new(1)
r2 = Random.new(1)

p r1 == r2 # => true
r2.rand
p r1 == r2 # => false
r1.rand
p r1 == r2 # => true
//}...

Digest::Base#==(md) -> bool (18315.0)

与えられたダイジェストオブジェクトと比較します。

...ェストオブジェクト

require 'digest/md5'
digest1 = Digest::MD5.new
digest1.update("ruby")
digest2 = Digest::MD5.new
digest2.update("ruby")
p digest1 == digest2 # => true
digest2.update("RUBY")
p digest1 == digest2 # => false...

Integer#==(other) -> bool (18314.0)

比較演算子。数値として等しいか判定します。

...比較演算子。数値として等しいか判定します。

@param other 比較対象の数値
@return self と other が等しい場合 true を返します。
そうでなければ false を返します。

//emlist[][ruby]{
1 == 2 # => false
1 == 1.0 # => true
//}...

UnboundMethod#==(other) -> bool (18314.0)

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

...場合に 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
//}...

絞り込み条件を変える

BasicObject#==(other) -> bool (18313.0)

オブジェクトが other と等しければ真を、さもなくば偽を返します。

...ルトでは Object#equal? と同じオブジェクトの同一性になっています。

@param other 比較対象となるオブジェクト
@return other が self と同値であれば真、さもなくば偽

//emlist[例][ruby]{
class Person < BasicObject
def initialize(name, age)
@name...
...= name
@age = age
end
end

tanaka1 = Person.new("tanaka", 24)
tanaka2 = Person.new("tanaka", 24)

tanaka1 == tanaka1 #=> true
tanaka1 == tanaka2 #=> false
//}

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

CSV::Row#==(other) -> bool (18313.0)

自身が other と同じヘッダやフィールドを持つ場合に真を返します。 そうでない場合は偽を返します。

...:Row のインスタンスを指定します。

//emlist[例][ruby]{
require "csv"

row1 = CSV::Row.new(["header1", "header2"], ["row1_1", "row1_2"])
row2 = CSV::Row.new(["header1", "header2"], ["row1_1", "row1_2"])

row1 == row2 # => true
row2 << ["header3", "row1_3"]
row1 == row2 # => false
//}...

Set#==(set) -> bool (18313.0)

2 つの集合が等しいときに true を返します。

...set が Set オブジェクトであり、self と set が同数の
要素を持ち、かつそれらの要素がすべて等しい場合に true となります。
それ以外の場合には、false を返します。
要素の等しさは Object#eql? により判定されます。

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

//emlist[][ruby]{
require 'set'
s1 = Set[10, 20, 30]
s2 = Set[10, 30, 40]
s3 = Set[30, 10, 30, 20]
p s1 == s2 # => false
p s1 == s3 # => true
//}...

Digest::Base#==(str) -> bool (18310.0)

与えられた文字列を hexdigest 値と見て、自身の hexdigest 値と比較します。

...られた文字列を hexdigest 値と見て、自身の hexdigest 値と比較します。

@param str 比較対象の hexdigest 文字列

require 'digest/md5'
digest = Digest::MD5.new
digest.update("ruby")
p digest == "58e53d1324eef6265fdb97b08ed9aadf" # => true...

Method#==(other) -> bool (18308.0)

自身と other が同じインスタンスの同じメソッドを表す場合に true を返します。そうでない場合に false を返します。

...ッドを表す場合に
true を返します。そうでない場合に false を返します。

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

//emlist[例][ruby]{
s = "bar"
a = s.method(:size)
b = s.method(:size)
p a == b #=> true
//}...

絞り込み条件を変える

<< < ... 2 3 4 5 6 ... > >>