1253件ヒット
[1-100件を表示]
(0.088秒)
ライブラリ
- ビルトイン (913)
- bigdecimal (33)
- csv (22)
- digest (22)
- fiddle (22)
- ipaddr (11)
- matrix (22)
- objspace (11)
- pathname (33)
- rake (11)
- readline (11)
-
rubygems
/ requirement (33) -
rubygems
/ version (11) - set (32)
- win32ole (11)
クラス
- Array (58)
- BasicObject (22)
- BigDecimal (33)
- Bignum (9)
- Binding (11)
-
CSV
:: Row (11) -
CSV
:: Table (11) - Complex (11)
- Data (4)
-
Digest
:: Base (22) -
Enumerator
:: Lazy (22) - Exception (11)
- FalseClass (33)
-
Fiddle
:: Pointer (22) - File (22)
- Fixnum (3)
- Float (22)
-
Gem
:: Requirement (33) -
Gem
:: Version (11) - Hash (55)
- IPAddr (11)
- Integer (36)
- MatchData (22)
- Method (22)
- Module (11)
- Numeric (11)
- Object (44)
- Pathname (33)
- Random (22)
- Range (32)
- Rational (11)
- Regexp (33)
- Set (32)
- String (141)
- Struct (22)
- Symbol (11)
- Thread (11)
- Time (22)
- TrueClass (33)
- UnboundMethod (22)
- Vector (22)
-
WIN32OLE
_ TYPE (11)
モジュール
- Comparable (11)
- Enumerable (80)
- GC (22)
- ObjectSpace (11)
-
Rake
:: Cloneable (11) - Readline (11)
キーワード
- & (22)
- +@ (9)
- -@ (9)
- === (109)
- =~ (11)
- Marshal フォーマット (11)
- Ruby用語集 (11)
- Symbol (11)
- [] (33)
- ^ (22)
- allbits? (7)
- bigdecimal (11)
- chunk (22)
- clone (22)
- dedup (2)
-
default
_ event _ sources (11) - dup (11)
- eql? (159)
- equal? (11)
- getlocal (22)
-
has
_ value? (11) - include? (34)
-
latest
_ gc _ info (22) -
local
_ variable _ defined? (11) - lstat (22)
-
marshal
_ dump (11) - member? (23)
-
memsize
_ of _ all (11) - nobits? (7)
- none? (47)
- one? (47)
-
pending
_ interrupt? (11) - readline (11)
-
ruby 1
. 8 . 2 feature (11) -
satisfied
_ by? (11) - slice (66)
- value? (11)
- | (22)
- 制御構造 (11)
検索結果
先頭5件
-
Symbol
# ==(other) -> true | false (21319.0) -
other が同じシンボルの時に真を返します。 そうでない場合は偽を返します。
...other が同じシンボルの時に真を返します。
そうでない場合は偽を返します。
@param other 比較対象のシンボルを指定します。
例:
:aaa == :aaa #=> true
:aaa == :xxx #=> false... -
Float
# ==(other) -> bool (21254.0) -
比較演算子。数値として等しいか判定します。
...urn self と other が等しい場合 true を返します。
そうでなければ false を返します。
//emlist[例][ruby]{
3.14 == 3.14000 # => true
3.14 == 3.1415 # => false
//}
NaNどうしの比較は、未定義です。
//emlist[例][ruby]{
Float::NAN == Float::NAN......# => false
[Float::NAN] == [Float::NAN] # => true
[Float::NAN] == [0.0 / 0.0] # => false
//}... -
Rational
# ==(other) -> bool (21248.0) -
数値として等しいか判定します。
...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
//}... -
Comparable
# ==(other) -> bool (21234.0) -
比較演算子 <=> をもとにオブジェクト同士を比較します。 <=> が 0 を返した時に、true を返します。 それ以外を返した場合は、false を返します。
...ジェクト同士を比較します。
<=> が 0 を返した時に、true を返します。
それ以外を返した場合は、false を返します。
@param other 自身と比較したいオブジェクトを指定します。
//emlist[例][ruby]{
1 == 1 # => true
1 == 2 # => false
//}... -
Complex
# ==(other) -> bool (21224.0) -
数値として等しいか判定します。
...数値として等しいか判定します。
@param other 自身と比較する数値
//emlist[例][ruby]{
Complex(2, 1) == Complex(1) # => false
Complex(1, 0) == Complex(1) # => true
Complex(1, 0) == 1 # => true
//}... -
BigDecimal
# ==(other) -> bool (21222.0) -
self が other と等しい場合に true を、そうでない場合に false を返します。
...self が other と等しい場合に true を、そうでない場合に false を返します。
それぞれの値は BigDecimal#coerce で変換して比較される場合があります。
//emlist[][ruby]{
require 'bigdecimal'
BigDecimal('1.0') == 1.0 # => true
//}... -
CSV
:: Table # ==(other) -> bool (21218.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", "......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 (21218.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... -
MatchData
# ==(other) -> bool (18270.0) -
self と other のマッチ対象になった文字列、元になった正規表現オブジェク ト、マッチした位置が等しければ true を返します。そうでない場合には false を返します。
...self と other のマッチ対象になった文字列、元になった正規表現オブジェク
ト、マッチした位置が等しければ true を返します。そうでない場合には
false を返します。
@param other 比較対象のオブジェクトを指定します。
//emlis......")
m1 == m2 # => false
m2 = s.match("a")
m1 == m2 # => true
//}
//emlist[正規表現][ruby]{
r = /abc/
m1 = r.match("abc") # => #<MatchData "abc">
m2 = r.match("abcde") # => #<MatchData "abc">
m1 == m2 # => false
m2 = r.match("abc") # => #<MatchData "abc">
m1 == m2 # => true
//}
//emlist[......正規表現のマッチした位置][ruby]{
r = /abc/
m1 = r.match("abcabc") # => #<MatchData "abc">
m2 = r.match("abcabc", 3) # => #<MatchData "abc">
m1 == m2 # => false
m2 = r.match("abcabc", 0) # => #<MatchData "abc">
m1 == m2 # => true
//}... -
Hash
# ==(other) -> bool (18264.0) -
自身と other が同じ数のキーを保持し、キーが eql? メソッドで比較して全て等しく、 値が == メソッドで比較して全て等しい場合に真を返します。
...キーが eql? メソッドで比較して全て等しく、
値が == メソッドで比較して全て等しい場合に真を返します。
@param other 自身と比較したい Hash オブジェクトを指定します。
//emlist[例][ruby]{
#(出力関数は省略)
{ 1 => :a } == { 1 => :a......} #=> true
{ 1 => :a } == { 1 => :a, 2 => :b } #=> false
{ 1 => :a } == { 1.0 => :a } #=> false ( 1.eql?(1.0) は false なので)
{ :x => 1 } == { :x => 1.0 } #=> true ( 1 == 1.0 は true なので)
//}
@see Hash#equal?...