種類
ライブラリ
- English (11)
- ビルトイン (2633)
- base64 (11)
- bigdecimal (44)
-
cgi
/ core (11) - coverage (6)
- csv (77)
- date (11)
- dbm (11)
- delegate (11)
- digest (22)
- drb (22)
- fiddle (33)
- find (22)
- gdbm (11)
- ipaddr (11)
- matrix (121)
-
net
/ ftp (9) - nkf (11)
- objspace (11)
- openssl (110)
- ostruct (11)
- pathname (44)
- prime (22)
- rake (33)
-
rdoc
/ context (11) - readline (11)
-
rexml
/ document (55) -
rubygems
/ package / tar _ header (11) -
rubygems
/ platform (22) -
rubygems
/ requirement (44) -
rubygems
/ version (22) - sdbm (33)
- set (54)
- socket (66)
- strscan (11)
- uri (11)
-
webrick
/ httpauth (11) - win32ole (22)
クラス
-
ARGF
. class (88) - Addrinfo (44)
- Array (340)
- BasicObject (44)
- BasicSocket (11)
- BigDecimal (44)
- Bignum (9)
- Binding (11)
- CGI (11)
- CSV (22)
-
CSV
:: Row (22) -
CSV
:: Table (33) - Complex (11)
- Coverage (6)
- DBM (11)
-
DRb
:: DRbObject (22) - Data (8)
- Date (11)
- Delegator (11)
-
Digest
:: Base (22) - Enumerator (23)
-
Enumerator
:: ArithmeticSequence (6) -
Enumerator
:: Lazy (118) - Exception (22)
- FalseClass (33)
-
Fiddle
:: Function (11) -
Fiddle
:: Pointer (22) - File (22)
- Fixnum (3)
- Float (33)
- GDBM (11)
-
Gem
:: Package :: TarHeader (11) -
Gem
:: Platform (22) -
Gem
:: Requirement (44) -
Gem
:: Version (22) - Hash (161)
- IPAddr (11)
- Integer (43)
- KeyError (7)
- MatchData (22)
- Matrix (99)
- Method (61)
- Module (11)
-
Net
:: FTP :: MLSxEntry (9) - Numeric (66)
- Object (77)
-
OpenSSL
:: BN (55) -
OpenSSL
:: PKey :: EC :: Group (22) -
OpenSSL
:: PKey :: EC :: Point (22) -
OpenSSL
:: SSL :: Session (11) - OpenStruct (11)
- Pathname (44)
- Prime (22)
- Proc (22)
-
Process
:: Status (11) -
RDoc
:: Context :: Section (11) -
REXML
:: Attribute (11) -
REXML
:: Comment (11) -
REXML
:: Element (11) -
REXML
:: Instruction (11) -
REXML
:: XMLDecl (11) -
Rake
:: FileList (22) - Random (13)
- Range (126)
- Rational (11)
- Regexp (33)
-
RubyVM
:: InstructionSequence (44) - SDBM (33)
- Set (54)
- Socket (11)
- String (292)
- StringScanner (11)
- Struct (22)
- Symbol (33)
- SystemCallError (11)
- Thread (22)
- Time (44)
- TrueClass (33)
-
URI
:: Generic (11) - UnboundMethod (44)
- Vector (22)
- WIN32OLE (11)
-
WIN32OLE
_ TYPE (11)
モジュール
- Base64 (11)
- Comparable (11)
- Enumerable (422)
- Find (22)
- GC (22)
- Kernel (11)
- ObjectSpace (11)
- Process (11)
-
Process
:: GID (22) -
Process
:: UID (22) -
Rake
:: Cloneable (11) - Readline (11)
-
WEBrick
:: HTTPAuth (11)
オブジェクト
- ENV (132)
キーワード
- != (11)
-
$ CHILD _ STATUS (11) - % (11)
- & (22)
- +@ (9)
- -@ (9)
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - === (171)
- =~ (11)
- DEFAULT (2)
- Marshal フォーマット (11)
-
NEWS for Ruby 2
. 4 . 0 (8) -
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 3
. 0 . 0 (4) - NKF (11)
- Numeric (11)
- OPS (11)
- Requirement (11)
- Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (11)
- [] (84)
- ^ (22)
-
_ _ id _ _ (11) - afamily (11)
- allbits? (7)
- assoc (22)
-
backtrace
_ locations (11) -
basic
_ auth (11) - bigdecimal (11)
- call (14)
- chunk (22)
-
chunk
_ while (11) - clone (33)
- collect (11)
- count (66)
- dedup (2)
-
default
_ event _ sources (11) - define (4)
- delete (22)
-
delete
_ if (88) - detect (22)
- disasm (22)
- disassemble (22)
- div (11)
- divide (22)
- divmod (22)
- downcase (8)
- dup (11)
- each (88)
-
each
_ key (22) -
each
_ line (44) -
each
_ pair (22) - eigen (11)
- eigensystem (11)
- empty (11)
- encode64 (11)
- eql? (214)
- equal? (11)
- file? (9)
- filter (12)
- filter! (12)
- find (44)
-
find
_ all (22) -
find
_ index (66) -
generate
_ prime (11) - getgm (11)
- getifaddrs (11)
- getlocal (22)
- getpeername (11)
- getrlimit (11)
- getutc (11)
- group (11)
-
has
_ value? (11) - hash (44)
- header (11)
- id2name (11)
- include? (45)
- index (33)
- instance (22)
- intern (11)
- itself (11)
- join (11)
-
keep
_ if (22) - key (7)
-
latest
_ gc _ info (22) - lazy (22)
-
line
_ stub (6) -
local
_ variable _ defined? (11) - lstat (22)
- lup (11)
-
lup
_ decomposition (11) - map (11)
- max (102)
- member? (23)
-
memsize
_ of _ all (11) - min (102)
- minmax (10)
-
mod
_ inverse (11) - modulo (11)
- new (57)
- nobits? (7)
- none? (47)
-
ole
_ func _ methods (11) - one? (47)
- pack (19)
- pack テンプレート文字列 (11)
- partition (22)
-
pending
_ interrupt? (11) - pfamily (11)
- produce (5)
- protocol (11)
- rassoc (11)
- readline (11)
- rect (11)
- rectangular (11)
- reject (66)
- reject! (55)
- remainder (11)
- rindex (33)
-
root
_ node (11) -
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 3 feature (11) -
ruby 1
. 8 . 4 feature (11) -
ruby 1
. 8 . 5 feature (11) -
satisfied
_ by? (11) - select (55)
- select! (22)
- sign (11)
- slice (66)
-
slice
_ after (20) -
slice
_ before (33) -
slice
_ when (10) - socktype (11)
- sort (22)
- split (17)
- sqrt (7)
- string (11)
- sum (11)
- switch (44)
-
to
_ h (17) -
to
_ hash (11) -
to
_ proc (11) -
to
_ s (11) -
to
_ sym (11) - tsort (11)
-
unicode
_ normalize! (10) - unpack (11)
- value? (11)
- yield (11)
- | (22)
- クラス/メソッドの定義 (11)
- 制御構造 (11)
- 多言語化 (11)
- 演算子式 (11)
検索結果
先頭5件
-
Enumerator
:: ArithmeticSequence # ==(other) -> bool (24400.0) -
Enumerable::ArithmeticSequence として等しいか判定します。
...
Enumerable::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 自身と比較したいオブジェクトを指定します。......
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
en......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
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
:: 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
//}...