るりまサーチ

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

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

ライブラリ

モジュール

オブジェクト

キーワード

検索結果

<< 1 2 3 ... > >>

URI::Generic#==(uri) -> bool (24306.0)

引数に指定した URI (文字列またはURIオブジェクト)との一致判定を行い ます。URI は正規化して比較されます。

...た URI (文字列またはURIオブジェクト)との一致判定を行い
ます。URI は正規化して比較されます。

@param uri 比較したい URI を URI オブジェクトで指定します。

例:
r
equire 'uri'
u1 = URI.parse('http://example.com/?hoge')
u2 = URI.parse('http:...
...//Example.Com/?hoge')
p u1 == u2 #=> true...

DRb::DRbObject#==(other) -> bool (24300.0)

DRb::DRbObject オブジェクト同士が同じであるなら真を返します。

...DRb::DRbObject オブジェクト同士が同じであるなら真を返します。

この同値判定は、
オブジェクトが参照している URI と識別子が等しいかどうかでします。...

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

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

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

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


//emlist[例][ruby]{
r
1 = Random.new(1)
r
2 = Random.new(1)

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

Array#==(other) -> bool (21334.0)

自身と other の各要素をそれぞれ順に == で比較し て、全要素が等しければ true を返します。そうでない場合には false を返します。

...と other の各要素をそれぞれ順に == で比較し
て、全要素が等しければ true を返します。そうでない場合には false を返します。

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

@see Object#==

//emlist[例][ruby]{
[ "a", "c" ] == [ "a",...
..."c", 7 ] #=> false
[ "a", "c", 7 ] == [ "a", "c", 7 ] #=> true
[ "a", "c", 7 ] == [ "a", "d", "f" ] #=> false
//}...

Range#==(other) -> bool (21334.0)

指定された other が Range クラスのインスタンスであり、 始端と終端が == メソッドで比較して等しく、Range#exclude_end? が同じ場合に true を返します。そうでない場合に false を返します。

...指定された other Range クラスのインスタンスであり、
始端と終端が == メソッドで比較して等しく、Range#exclude_end? が同じ場合に
true を返します。そうでない場合に false を返します。

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

//emlist[例][ruby]{
p (1..2) == (1..2) # => true
p (1..2) == (1...2) # => false
p (1..2) == Range.new(1.0, 2.0) # => true
//}...

絞り込み条件を変える

Rational#==(other) -> bool (21330.0)

数値として等しいか判定します。

...

@param other 自身と比較する数値

@return self と other が等しい場合 true を返します。
そうでなければ false を返します。

//emlist[例][ruby]{
R
ational(2, 3) == Rational(2, 3) # => true
R
ational(5) == 5 # => true
R
ational...
...(0) == 0.0 # => true
R
ational('1/3') == 0.33 # => false
R
ational('1/2') == '1/2' # => false
//}...

Regexp#==(other) -> bool (21324.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
//}...

String#==(other) -> bool (21324.0)

other が文字列の場合、String#eql? と同様に文字列の内容を比較します。

...other が文字列の場合、String#eql? と同様に文字列の内容を比較します。

other が文字列でない場合、
other.to_str が定義されていれば
other == self の結果を返します。(ただし、 other.to_str は実行されません。)
そうでなければ false...
...ram other 任意のオブジェクト
@return true か false

//emlist[例][ruby]{
stringlike = Object.new

def stringlike.==(other)
"string" == other
end

p "string".eql?(stringlike) #=> false
p "string" == stringlike #=> false

def stringlike.to_str
r
aise
end

p "string".eql?(str...
...inglike) #=> false
p "string" == stringlike #=> true
//}

@see String#eql?...

Struct#==(other) -> bool (21322.0)

self と other のクラスが同じであり、各メンバが == メソッドで比較して等しい場合に true を返します。そうでない場合に false を返します。

...f と other のクラスが同じであり、各メンバが == メソッドで比較して等しい場合に
true を返します。そうでない場合に false を返します。

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

//emlist[例][ruby]{
Dog = Struct.new(:...
...red", 5)
dog2 = Dog.new("fred", 5)

p dog1 == dog2 #=> true
p dog1.eql?(dog2) #=> true
p dog1.equal?(dog2) #=> false
//}

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

@see Struct#eql?...

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

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

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

@param other 比較対象の CSV::Row のインスタンスを指定します。

//emlist[例][ruby]{
r
equire "csv"

r
ow1 = CSV::Row.new(["header1", "header2"], ["row1_1", "r...
...ow1_2"])
r
ow2 = CSV::Row.new(["header1", "header2"], ["row1_1", "row1_2"])

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

絞り込み条件を変える

<< 1 2 3 ... > >>