1975件ヒット
[1-100件を表示]
(0.103秒)
種類
- インスタンスメソッド (1662)
- 特異メソッド (194)
- モジュール関数 (66)
- クラス (31)
- モジュール (22)
クラス
-
ARGF
. class (77) - Array (309)
- BasicObject (44)
- Bignum (9)
- Binding (11)
- Data (4)
- Enumerator (23)
-
Enumerator
:: ArithmeticSequence (6) -
Enumerator
:: Lazy (96) - Exception (22)
- File (22)
- Fixnum (3)
- Float (11)
- Hash (78)
- Integer (43)
- Method (11)
- Numeric (66)
- Object (33)
- Proc (11)
-
Process
:: Status (11) - Range (79)
- Rational (11)
- Regexp (33)
-
RubyVM
:: InstructionSequence (44) - String (314)
- Symbol (22)
- Thread (11)
- Time (44)
- UnboundMethod (11)
モジュール
- Enumerable (309)
- GC (22)
- Math (11)
- Process (11)
-
Process
:: GID (22) -
Process
:: UID (22)
オブジェクト
- ENV (66)
キーワード
- != (11)
- % (11)
- +@ (9)
- -@ (9)
- === (47)
- ConditionVariable (9)
- GID (11)
- Numeric (11)
- String (11)
- UID (11)
- [] (66)
-
_ _ id _ _ (11) - allbits? (7)
- asin (11)
- assoc (22)
-
backtrace
_ locations (11) - chunk (11)
-
chunk
_ while (11) - collect (11)
- count (66)
- crypt (11)
- dedup (2)
- define (4)
- delete (11)
-
delete
_ if (44) - detect (22)
- disasm (22)
- disassemble (22)
- div (11)
- divmod (22)
- downcase (8)
- dump (11)
- each (33)
-
each
_ line (44) -
each
_ pair (22) - eql? (25)
- equal? (11)
- filter (12)
- filter! (12)
- find (22)
-
find
_ all (22) -
find
_ index (66) - getgm (11)
- getlocal (22)
- getrlimit (11)
- getutc (11)
- hash (44)
- id2name (11)
- include? (27)
- index (33)
- intern (11)
- itself (11)
-
keep
_ if (22) -
latest
_ gc _ info (22) -
local
_ variable _ defined? (11) - lstat (22)
- map (11)
- max (60)
- member? (11)
- min (118)
- minmax (10)
- modulo (11)
- new (46)
- nobits? (7)
- pack (19)
- partition (22)
-
pending
_ interrupt? (11) - produce (5)
- rassoc (22)
- reject (44)
- reject! (44)
- remainder (11)
- rindex (33)
- select (22)
- select! (22)
- slice (66)
-
slice
_ after (20) -
slice
_ before (33) -
slice
_ when (10) - split (17)
- sqrt (7)
- sum (11)
- switch (44)
-
to
_ s (11) -
to
_ sym (11) -
unicode
_ normalize! (10) - unpack (11)
- yield (11)
検索結果
先頭5件
-
Exception
# ==(other) -> bool (29136.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......ception { 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] == re... -
Rational
# ==(other) -> bool (29132.0) -
数値として等しいか判定します。
...なければ 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
//}......でなければ 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 (29126.0) -
other が文字列の場合、String#eql? と同様に文字列の内容を比較します。
...other が文字列の場合、String#eql? と同様に文字列の内容を比較します。
other が文字列でない場合、
other.to_str が定義されていれば
other == self の結果を返します。(ただし、 other.to_str は実行されません。)
そうでなければ 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" == stringlike #=> true
//}
@see String#e... -
BasicObject
# ==(other) -> bool (29114.0) -
オブジェクトが other と等しければ真を、さもなくば偽を返します。
...//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#==, Obje... -
Integer
# ==(other) -> bool (29114.0) -
比較演算子。数値として等しいか判定します。
...比較演算子。数値として等しいか判定します。
@param other 比較対象の数値
@return self と other が等しい場合 true を返します。
そうでなければ false を返します。
//emlist[][ruby]{
1 == 2 # => false
1 == 1.0 # => true
//}... -
Bignum
# ==(other) -> bool (29102.0) -
比較演算子。数値として等しいか判定します。
比較演算子。数値として等しいか判定します。
@param other 比較対象の数値
@return self と other が等しい場合 true を返します。
そうでなければ false を返します。 -
Enumerator
:: ArithmeticSequence # ==(other) -> bool (29102.0) -
Enumerable::ArithmeticSequence として等しいか判定します。
...Enumerable::ArithmeticSequence として等しいか判定します。
other が Enumerable::ArithmeticSequence で
begin, end, step, exclude_end? が等しい時に
true を返します。
@param other 自身と比較する Enumerable::ArithmeticSequence... -
Fixnum
# ==(other) -> bool (29102.0) -
比較演算子。数値として等しいか判定します。
比較演算子。数値として等しいか判定します。
@param other 比較対象の数値
@return self と other が等しい場合 true を返します。
そうでなければ false を返します。 -
Regexp
# ==(other) -> bool (26132.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
//}... -
Process
:: Status # ==(other) -> bool (26108.0) -
同じステータスの場合に真を返します。
...同じステータスの場合に真を返します。
other が数値の場合、self.to_i との比較が行われます。こ
れは後方互換性のためです。
@param other 自身と比較したいオブジェクトを指定します。... -
Enumerable
# find _ index {|obj| . . . } -> Integer | nil (20368.0) -
条件に一致する最初の要素の位置を返します。
...トを指定します。
指定された val と == で等しい最初の要素の位置を返します。
等しい要素がひとつもなかった場合は nil を返します。
//emlist[例][ruby]{
(1..10).find_index(11) #=> nil
(1..10).find_index(2) #=> 1
//}
ブロックが与えられ......の位置を返します。
一つも真にならなかった場合は nil を返します。
//emlist[例][ruby]{
(1..10).find_index {|i| i % 5 == 0 and i % 7 == 0 } #=> nil
(1..100).find_index {|i| i % 5 == 0 and i % 7 == 0 } #=> 34
//}
引数、ブロックのどちらも与えられなか...