2340件ヒット
[1-100件を表示]
(0.248秒)
別のキーワード
ライブラリ
- ビルトイン (1975)
- bigdecimal (36)
-
cgi
/ core (12) - csv (48)
- digest (12)
- matrix (72)
- pathname (48)
- prime (24)
- rake (24)
-
rexml
/ document (12) -
rubygems
/ requirement (36) -
rubygems
/ version (12) - set (5)
- strscan (12)
- win32ole (12)
クラス
- Array (337)
- BasicObject (48)
- BigDecimal (36)
- CGI (12)
-
CSV
:: Row (24) -
CSV
:: Table (24) - Complex (12)
- Data (6)
-
Digest
:: Base (12) -
Enumerator
:: Lazy (129) - Exception (24)
- FalseClass (36)
- Float (36)
-
Gem
:: Requirement (36) -
Gem
:: Version (12) - Hash (88)
- Integer (40)
- MatchData (24)
- Matrix (72)
- Method (68)
- Numeric (72)
- Object (60)
- Pathname (48)
- Prime (24)
- Proc (12)
-
REXML
:: Element (12) -
Rake
:: FileList (12) - Random (12)
- Range (116)
- Rational (12)
- Regexp (36)
-
RubyVM
:: InstructionSequence (24) - Set (8)
- String (314)
- StringScanner (12)
- Struct (24)
- TrueClass (36)
- UnboundMethod (36)
-
WIN32OLE
_ TYPE (12)
モジュール
- Comparable (12)
- Enumerable (358)
-
Rake
:: Cloneable (12)
キーワード
- != (12)
- % (12)
- & (24)
- +@ (10)
- -@ (10)
- === (104)
- =~ (12)
- [] (80)
- ^ (24)
-
_ _ id _ _ (12) - allbits? (8)
-
backtrace
_ locations (12) - call (16)
- chunk (24)
-
chunk
_ while (12) - clone (24)
- collect (12)
- count (72)
- crypt (12)
- dedup (3)
-
default
_ event _ sources (12) - delete (24)
-
delete
_ if (48) - detect (24)
- disasm (12)
- disassemble (12)
- div (12)
- divmod (24)
- downcase (9)
- dump (12)
- each (24)
- eigen (12)
- eigensystem (12)
- eql? (147)
- equal? (12)
- filter (14)
- filter! (14)
- find (24)
-
find
_ all (24) -
find
_ index (72) - hash (48)
- header (12)
- index (36)
- intern (12)
- join (12)
-
keep
_ if (19) - lazy (24)
- lup (12)
-
lup
_ decomposition (12) - map (12)
- max (88)
- member? (8)
- min (88)
- minmax (12)
- modulo (12)
- nobits? (8)
- none? (15)
- one? (45)
- pack (21)
- partition (24)
- rect (12)
- rectangular (12)
- reject (48)
- reject! (24)
- remainder (12)
- rindex (36)
-
root
_ node (12) -
satisfied
_ by? (12) - select (24)
- select! (19)
- slice (72)
-
slice
_ after (22) -
slice
_ before (36) -
slice
_ when (11) - sort (24)
- split (19)
- string (12)
- sum (12)
-
to
_ proc (12) -
to
_ sym (12) -
unicode
_ normalize! (11) - unpack (12)
- | (24)
検索結果
先頭5件
-
Rational
# ==(other) -> bool (24337.0) -
数値として等しいか判定します。
...@param other 自身と比較する数値
@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 (24331.0) -
other が文字列の場合、String#eql? と同様に文字列の内容を比較します。
...other が文字列の場合、String#eql? と同様に文字列の内容を比較します。
other が文字列でない場合、
other.to_str が定義されていれば
other == self の結果を返します。(ただし、 other.to_str は実行されません。)
そうでなければ false......ram other 任意のオブジェクト
@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?(str......inglike) #=> false
p "string" == stringlike #=> true
//}
@see String#eql?... -
Struct
# ==(other) -> bool (24329.0) -
self と other のクラスが同じであり、各メンバが == メソッドで比較して等しい場合に true を返します。そうでない場合に false を返します。
...f と other のクラスが同じであり、各メンバが == メソッドで比較して等しい場合に
true を返します。そうでない場合に false を返します。
@param other self と比較したいオブジェクトを指定します。
//emlist[例][ruby]{
Dog = Struct.new(:......red", 5)
dog2 = Dog.new("fred", 5)
p dog1 == dog2 #=> true
p dog1.eql?(dog2) #=> true
p dog1.equal?(dog2) #=> false
//}
[注意] 本メソッドの記述は Struct の下位クラスのインスタンスに対して呼び
出す事を想定しています。Str......uct.new は Struct の下位クラスを作成する点に
注意してください。
@see Struct#eql?... -
Integer
# ==(other) -> bool (24319.0) -
比較演算子。数値として等しいか判定します。
...比較演算子。数値として等しいか判定します。
@param other 比較対象の数値
@return self と other が等しい場合 true を返します。
そうでなければ false を返します。
//emlist[][ruby]{
1 == 2 # => false
1 == 1.0 # => true
//}... -
Rake
:: FileList # ==(array) -> bool (24213.0) -
自身を配列に変換してから与えられた配列と比較します。
...列と比較します。
@param array 比較対象の配列を指定します。
//emlist[][ruby]{
# Rakefile での記載例とする
task default: :test_rake_app
task :test_rake_app do
file_list = FileList.new('lib/**/*.rb', 'test/test*.rb')
file_list == file_list.to_a # => true
end
//}... -
MatchData
# ==(other) -> bool (21403.0) -
self と other のマッチ対象になった文字列、元になった正規表現オブジェク ト、マッチした位置が等しければ true を返します。そうでない場合には false を返します。
...と other のマッチ対象になった文字列、元になった正規表現オブジェク
ト、マッチした位置が等しければ true を返します。そうでない場合には
false を返します。
@param other 比較対象のオブジェクトを指定します。
//emlist[文......字列][ruby]{
s = "abc"
m1 = s.match("a")
m2 = s.match("b")
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
/... -
Random
# ==(other) -> bool (21385.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
//}... -
Float
# ==(other) -> bool (21343.0) -
比較演算子。数値として等しいか判定します。
...aram other 比較対象の数値
@return 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
//}... -
Array
# ==(other) -> bool (21341.0) -
自身と other の各要素をそれぞれ順に == で比較し て、全要素が等しければ true を返します。そうでない場合には false を返します。
...と other の各要素をそれぞれ順に == で比較し
て、全要素が等しければ true を返します。そうでない場合には false を返します。
@param other 自身と比較したい配列を指定します。
@see Object#==
//emlist[例][ruby]{
[ "a", "c" ] == [ "a",......"c", 7 ] #=> false
[ "a", "c", 7 ] == [ "a", "c", 7 ] #=> true
[ "a", "c", 7 ] == [ "a", "d", "f" ] #=> false
//}...