ライブラリ
- ビルトイン (1852)
- bigdecimal (11)
-
cgi
/ core (22) - csv (11)
- fiddle (22)
- gdbm (11)
- ipaddr (11)
- matrix (55)
-
net
/ ftp (9) - openssl (99)
- ostruct (11)
- pathname (44)
- prime (22)
- rake (11)
-
rdoc
/ context (11) -
rexml
/ document (33) -
rinda
/ rinda (11) -
rubygems
/ requirement (33) -
rubygems
/ version (11) - sdbm (11)
- set (29)
- socket (55)
- strscan (11)
- uri (11)
- win32ole (22)
- zlib (11)
クラス
-
ARGF
. class (88) - Addrinfo (44)
- Array (339)
- BasicObject (11)
- BasicSocket (11)
- BigDecimal (11)
- Bignum (9)
- Binding (11)
- CGI (22)
-
CSV
:: Table (11) -
Enumerator
:: ArithmeticSequence (6) -
Enumerator
:: Lazy (118) - Exception (22)
-
Fiddle
:: Pointer (22) - Fixnum (3)
- Float (11)
- GDBM (11)
-
Gem
:: Requirement (33) -
Gem
:: Version (11) - Hash (67)
- IPAddr (11)
- Integer (36)
- Matrix (55)
- Method (11)
-
Net
:: FTP :: MLSxEntry (9) - Numeric (66)
- Object (33)
-
OpenSSL
:: BN (44) -
OpenSSL
:: PKey :: EC :: Group (22) -
OpenSSL
:: PKey :: EC :: Point (22) -
OpenSSL
:: SSL :: Session (11) - OpenStruct (11)
- Pathname (44)
- Prime (22)
- Proc (44)
-
RDoc
:: Context :: Section (11) -
REXML
:: Comment (11) -
REXML
:: Element (11) -
REXML
:: Instruction (11) - Random (33)
- Range (126)
- Rational (11)
- Regexp (11)
-
Rinda
:: DRbObjectTemplate (11) -
RubyVM
:: InstructionSequence (22) - SDBM (11)
- Set (29)
- String (286)
- StringScanner (11)
- Symbol (22)
-
URI
:: Generic (11) - UnboundMethod (44)
- WIN32OLE (11)
-
WIN32OLE
_ TYPE (11) -
Zlib
:: GzipReader (11)
モジュール
- Enumerable (422)
-
Rake
:: Cloneable (11)
キーワード
- % (11)
- +@ (9)
- -@ (9)
- === (102)
- =~ (11)
- [] (77)
-
_ _ id _ _ (11) - afamily (11)
- allbits? (7)
- assoc (22)
-
backtrace
_ locations (11) - call (11)
- chunk (22)
-
chunk
_ while (11) - clone (33)
- collect (11)
- count (66)
- crypt (11)
- dedup (2)
-
default
_ event _ sources (11) - delete (11)
-
delete
_ if (22) - detect (22)
- disasm (11)
- disassemble (11)
- div (11)
- divide (22)
- divmod (22)
- downcase (8)
- dump (11)
- dup (11)
- each (66)
-
each
_ line (44) - eigen (11)
- eigensystem (11)
- eql? (91)
- file? (9)
- filter (12)
- filter! (12)
- find (22)
-
find
_ all (22) -
find
_ index (66) - getpeername (11)
- hash (44)
- header (11)
- id2name (11)
- include? (45)
- index (33)
- intern (11)
- join (11)
-
keep
_ if (11) - lazy (22)
- lineno= (11)
-
local
_ variable _ defined? (11) - lup (11)
-
lup
_ decomposition (11) - map (11)
-
marshal
_ dump (11) -
marshal
_ load (11) - max (118)
- member? (16)
- min (118)
- minmax (10)
-
mod
_ inverse (11) - modulo (11)
- nobits? (7)
- none? (47)
-
ole
_ func _ methods (11) - one? (47)
- out (11)
- pack (19)
- partition (22)
- pfamily (11)
- protocol (11)
- rassoc (22)
- rectangular (11)
- reject (33)
- reject! (22)
- remainder (11)
- rindex (33)
-
root
_ node (11) -
satisfied
_ by? (11) - select (44)
- select! (22)
- sign (11)
- slice (66)
-
slice
_ after (20) -
slice
_ before (33) -
slice
_ when (10) - socktype (11)
- sort (22)
- split (17)
- string (11)
- sum (11)
-
to
_ s (11) -
to
_ sym (11) -
unicode
_ normalize! (10) - unpack (11)
- yield (11)
検索結果
先頭5件
-
Exception
# ==(other) -> bool (21135.0) -
自身と指定された other のクラスが同じであり、 message と backtrace が == メソッドで比較して 等しい場合に true を返します。そうでない場合に false を返します。
...自身と指定された other のクラスが同じであり、
message と backtrace が == メソッドで比較して
等しい場合に true を返します。そうでない場合に false を返します。
@param other 自身と比較したいオブジェクトを指定します。......Exception#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"
end
def get_exception
return begin
yield
rescue => e
e
end
end
results......eption { 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 が同一のため true になる
p results[0] == res... -
Range
# ==(other) -> bool (21135.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 (21131.0) -
数値として等しいか判定します。
...return self と other が等しい場合 true を返します。
そうでなければ false を返します。
//emlist[例][ruby]{
Rational(2, 3) == Rational(2, 3) # => true
Rational(5) == 5 # => true
Rational(0) == 0.0 # => true
Rational('......1/3') == 0.33 # => false
Rational('1/2') == '1/2' # => false
//}... -
String
# ==(other) -> bool (21125.0) -
other が文字列の場合、String#eql? と同様に文字列の内容を比較します。
...other が文字列の場合、String#eql? と同様に文字列の内容を比較します。
other が文字列でない場合、
other.to_str が定義されていれば
other == self の結果を返します。(ただし、 other.to_str は実行されません。)
そうでなければ false......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
raise
end
p "string".eql?(stringlike) #=> false
p "string" == stringlik......e #=> true
//}
@see String#eql?... -
Pathname
# ==(other) -> bool (21119.0) -
パス名を比較し、 other と同じなら真を返します。大文字小文字は区別されます。 other は Pathname オブジェクトでなければなりません。
...other は Pathname オブジェクトでなければなりません。
パス名の比較は単純にパス文字列の比較によって行われるので、論理的に
同じパスでもパス文字列が違えば異なると判断されます。
@param other 比較対象の 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 (21119.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
//}... -
Fiddle
:: Pointer # ==(other) -> bool (21113.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... -
Integer
# ==(other) -> bool (21113.0) -
比較演算子。数値として等しいか判定します。
...比較演算子。数値として等しいか判定します。
@param other 比較対象の数値
@return self と other が等しい場合 true を返します。
そうでなければ false を返します。
//emlist[][ruby]{
1 == 2 # => false
1 == 1.0 # => true
//}... -
UnboundMethod
# ==(other) -> bool (21113.0) -
自身と other が同じクラスあるいは同じモジュールの同じメソッドを表す場合に true を返します。そうでない場合に 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
//}... -
URI
:: Generic # ==(uri) -> bool (21107.0) -
引数に指定した URI (文字列またはURIオブジェクト)との一致判定を行い ます。URI は正規化して比較されます。
...す。URI は正規化して比較されます。
@param uri 比較したい URI を URI オブジェクトで指定します。
例:
require 'uri'
u1 = URI.parse('http://example.com/?hoge')
u2 = URI.parse('http://Example.Com/?hoge')
p u1 == u2 #=> true...