ライブラリ
- ビルトイン (239)
- bigdecimal (11)
- drb (11)
- fiddle (11)
- matrix (22)
- openssl (33)
- pathname (11)
-
rubygems
/ requirement (33) -
rubygems
/ version (11)
クラス
- Array (19)
- BasicObject (11)
- BigDecimal (11)
- Bignum (3)
-
DRb
:: DRbObject (11) - Data (2)
-
Enumerator
:: ArithmeticSequence (6) -
Fiddle
:: Pointer (11) - Float (22)
-
Gem
:: Requirement (33) -
Gem
:: Version (11) - Hash (11)
- MatchData (11)
- Matrix (11)
- Method (11)
- Numeric (66)
- Object (11)
-
OpenSSL
:: BN (11) -
OpenSSL
:: PKey :: EC :: Group (11) -
OpenSSL
:: PKey :: EC :: Point (11) - Pathname (11)
- Regexp (11)
-
RubyVM
:: InstructionSequence (22) - String (11)
- Struct (11)
- UnboundMethod (11)
- Vector (11)
検索結果
先頭5件
-
Enumerator
:: ArithmeticSequence # ==(other) -> bool (21101.0) -
Enumerable::ArithmeticSequence として等しいか判定します。
...Enumerable::ArithmeticSequence として等しいか判定します。
other が Enumerable::ArithmeticSequence で
begin, end, step, exclude_end? が等しい時に
true を返します。
@param other 自身と比較する Enumerable::ArithmeticSequence... -
Gem
:: Requirement # ===(version) -> bool (15201.0) -
引数 version が自身に含まれる全ての必要条件を満たす場合に true を返します。 そうでなければ、false を返します。
...うでなければ、false を返します。
@param version Gem::Version のインスタンスを指定します。
//emlist[][ruby]{
req = Gem::Requirement.new("~> 3.2.1")
p req.satisfied_by?(Gem::Version.new('3.2.9')) # => true
p req.satisfied_by?(Gem::Version.new('3.3.0')) # => false
//}... -
Gem
:: Requirement # =~(version) -> bool (9001.0) -
引数 version が自身に含まれる全ての必要条件を満たす場合に true を返します。 そうでなければ、false を返します。
...うでなければ、false を返します。
@param version Gem::Version のインスタンスを指定します。
//emlist[][ruby]{
req = Gem::Requirement.new("~> 3.2.1")
p req.satisfied_by?(Gem::Version.new('3.2.9')) # => true
p req.satisfied_by?(Gem::Version.new('3.3.0')) # => false
//}... -
Gem
:: Requirement # satisfied _ by?(version) -> bool (9001.0) -
引数 version が自身に含まれる全ての必要条件を満たす場合に true を返します。 そうでなければ、false を返します。
...うでなければ、false を返します。
@param version Gem::Version のインスタンスを指定します。
//emlist[][ruby]{
req = Gem::Requirement.new("~> 3.2.1")
p req.satisfied_by?(Gem::Version.new('3.2.9')) # => true
p req.satisfied_by?(Gem::Version.new('3.3.0')) # => false
//}... -
Hash
# eql?(other) -> bool (6147.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?... -
MatchData
# eql?(other) -> bool (6137.0) -
self と other のマッチ対象になった文字列、元になった正規表現オブジェク ト、マッチした位置が等しければ true を返します。そうでない場合には false を返します。
...= 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
//}... -
Regexp
# eql?(other) -> bool (6125.0) -
otherが同じパターン、オプション、文字コードの正規表現であったらtrueを返します。
...ら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
//}... -
Numeric
# eql?(other) -> bool (6123.0) -
自身と other のクラスが等しくかつ == メソッドで比較して等しい場合に true を返します。 そうでない場合に false を返します。
...自身と other のクラスが等しくかつ == メソッドで比較して等しい場合に true を返します。
そうでない場合に false を返します。
Numeric のサブクラスは、eql? で比較して等しい数値同士が同じハッシュ値を返すように
hash メソ......ッドを適切に定義する必要があります。
@param other 自身と比較したい数値を指定します。
//emlist[例][ruby]{
p 1.eql?(1) #=> true
p 1.eql?(1.0) #=> false
p 1 == 1.0 #=> true
//}
@see Object#equal?, Object#eql?, Object#==, Object#===... -
Pathname
# eql?(other) -> bool (6119.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
//}... -
Float
# eql?(other) -> bool (6117.0) -
自身と other のクラスが等しくかつ == メソッドで比較して等しい場合に true を返します。 そうでない場合に false を返します。
...her のクラスが等しくかつ == メソッドで比較して等しい場合に true を返します。
そうでない場合に false を返します。
@param other 自身と比較したい数値を指定します。
//emlist[例][ruby]{
1.0.eql?(1) # => false
1.0.eql?(1.0) # => true
//}...