るりまサーチ

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

別のキーワード

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

ライブラリ

モジュール

オブジェクト

キーワード

検索結果

<< 1 2 3 ... > >>

Enumerator::ArithmeticSequence#==(other) -> bool (24400.0)

Enumerable::ArithmeticSequence として等しいか判定します。

...
E
numerable::ArithmeticSequence として等しいか判定します。

other が Enumerable::ArithmeticSequence
begin, end, step, exclude_end? が等しい時に
true を返します。

@param other 自身と比較する Enumerable::ArithmeticSequence...

Exception#==(other) -> bool (21488.0)

自身と指定された other のクラスが同じであり、 message と backtrace が == メソッドで比較して 等しい場合に true を返します。そうでない場合に false を返します。

...自身と指定された other のクラスが同じであり、
message と backtrace == メソッドで比較して
等しい場合に true を返します。そうでない場合に false を返します。

@param other 自身と比較したいオブジェクトを指定します。...
...
E
xception#exception を実行して変換を試みます。

//emlist[例][ruby]{
require "date"
def check_long_month(month)
return if Date.new(2000, month, -1).day == 31
raise "#{month} is not long month"
e
nd

def get_exception
return begin
yield
rescue => e
e

e
nd
e
n...
...d

results = [2, 2, 4].map { |e | get_exception { check_long_month(e) } }
p results.map { |e| e.class }
# => [RuntimeError, RuntimeError, RuntimeError]
p results.map { |e| e.message }
# => ["2 is not long month", "2 is not long month", "4 is not long month"]

# class, message, backtrace が同一の...

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

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

Object#==(other) -> bool (21424.0)

オブジェクトと other が等しければ真を返します。

...オブジェクトと other が等しければ真を返します。

このメソッドは各クラスの性質に合わせて再定義すべきです。
多くの場合、オブジェクトの内容が等しければ真を返すように
(同値性を判定するように)再定義されるこ...
...ォルトでは equal? と同じオブジェクト
の同一性判定になっています。

@param other 比較するオブジェクトです。

//emlist[][ruby]{
p("foo" == "bar") #=> false
p("foo" == "foo") #=> true

p(4 == 4) #=> true
p(4 == 4.0) #=> true
//}

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

絞り込み条件を変える

Complex#==(other) -> bool (21418.0)

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

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

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

//emlist[例][ruby]{
Complex(2, 1) == Complex(1) # => false
Complex(1, 0) == Complex(1) # => true
Complex(1, 0) == 1 # => true
//}...

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

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

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

パス名の比較は単純にパス文字列の比較によって行われるので、論理的に
同じパスで...
...her 比較対象の 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
//}...

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

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

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

このメソッドは各クラスの性質に合わせて、サブクラスで再定義するべきです。
多くの場合、オブジェクトの内容が等しければ真を返すように (同値性を...
...ect#equal? と同じオブジェクトの同一性になっています。

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

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

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::Table#==(other) -> bool (21412.0)

自身の全ての行が比較対象と同じである場合は真を返します。 そうでない場合は偽を返します。

...ther CSV::Table を指定します。

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

row1_1 = CSV::Row.new(["header1", "header2"], ["row1_1", "row1_2"])
row1_2 = CSV::Row.new(["header1", "header2"], ["row2_1", "row2_2"])
row2_1 = CSV::Row.new(["header1", "header2"], ["row1_1", "row1_2"])
row2_2 = CSV::Row.new...
...(["header1", "header2"], ["row2_1", "row2_2"])
table1 = CSV::Table.new([row1_1, row1_2])
table2 = CSV::Table.new([row2_1, row2_2])
table1 == table2 # => true
table2 << CSV::Row.new(["header1", "header2"], ["row3_1", "row3_2"])
table1 == table2 # => false
//}...

Comparable#==(other) -> bool (21412.0)

比較演算子 <=> をもとにオブジェクト同士を比較します。 <=> が 0 を返した時に、true を返します。 それ以外を返した場合は、false を返します。

...=> をもとにオブジェクト同士を比較します。
<=> が 0 を返した時に、true を返します。
それ以外を返した場合は、false を返します。

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

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

絞り込み条件を変える

<< 1 2 3 ... > >>