るりまサーチ

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

別のキーワード

  1. kernel require
  2. getoptlong require_order
  3. rubygems/custom_require require
  4. irb/ext/use-loader irb_require
  5. require execute

ライブラリ

クラス

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

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

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

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

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

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

def get_exception
return begin
yield
rescue => e
e
end
end

results = [2, 2, 4].map { |e | get_ex...
...ts.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 が同一のため true になる
p results[0] == results[1] # => true

# class, backtrace...

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

Digest::Base#==(md) -> bool (18221.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...

CSV::Row#==(other) -> bool (18219.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
//}...

CSV::Table#==(other) -> bool (18219.0)

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

...場合は真を返します。
そうでない場合は偽を返します。

@param other 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"])
row...
...ow1_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
//}...

絞り込み条件を変える

Fiddle::Pointer#==(other) -> bool (18219.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...

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

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

...を返します。
要素の等しさは 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 (18216.0)

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

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

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

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

BigDecimal#==(other) -> bool (18213.0)

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

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

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

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

IPAddr#==(ipaddr) -> bool (18213.0)

IPAddr オブジェクト同士が等しいかを比較します。

...IPAddr オブジェクト同士が等しいかを比較します。

@param ipaddr 比較対象の IPAddr オブジェクト。
また、数値や文字列も受け付けます。

例:

require
"ipaddr"
p IPAddr.new("192.168.0.1") == IPAddr.new("192.168.0.1/24") # => false...

絞り込み条件を変える

<< 1 2 3 ... > >>