種類
- インスタンスメソッド (1343)
- 特異メソッド (74)
- モジュール関数 (22)
- クラス (11)
ライブラリ
- ビルトイン (1450)
クラス
- Array (134)
- BasicObject (55)
- Bignum (9)
- Class (14)
- Complex (22)
-
Encoding
:: Converter (22) -
Enumerator
:: Lazy (44) -
Enumerator
:: Yielder (11) - Exception (22)
- Fixnum (12)
- Float (22)
- Hash (64)
- IO (11)
- Integer (44)
- Method (16)
- Module (115)
- Object (121)
- Proc (6)
- Range (133)
-
RubyVM
:: InstructionSequence (141) - String (94)
- Symbol (11)
- Thread (30)
-
Thread
:: Backtrace :: Location (11) -
Thread
:: SizedQueue (27) - TracePoint (6)
- UnboundMethod (11)
モジュール
- Comparable (22)
- Enumerable (187)
- Kernel (22)
キーワード
- ! (11)
- != (11)
- << (71)
- <= (67)
- <=> (25)
- == (11)
- === (11)
- BasicObject (11)
-
absolute
_ path (11) -
backtrace
_ locations (33) -
base
_ label (22) - bind (11)
-
bit
_ length (17) - bsearch (44)
-
bsearch
_ index (18) -
chunk
_ while (11) -
class
_ variables (11) - compile (11)
-
compile
_ file (11) -
const
_ source _ location (5) - cover? (17)
- disasm (22)
- disassemble (22)
-
drop
_ while (22) - enq (9)
-
enum
_ for (33) - filter (12)
- include? (11)
- inherited (11)
- initialize (11)
-
insert
_ output (11) - inspect (5)
-
instance
_ eval (22) -
instance
_ methods (11) -
instance
_ of? (11) -
instruction
_ sequence (6) -
is
_ a? (11) -
kind
_ of? (11) - label (11)
- lazy (11)
- max (118)
-
method
_ defined? (11) - methods (11)
- min (118)
- minmax (10)
- new (11)
- of (11)
- pack (19)
- path (11)
-
private
_ method _ defined? (11) -
protected
_ method _ defined? (11) -
public
_ method _ defined? (11) - push (9)
- replacement= (11)
-
report
_ on _ exception (8) - scrub (33)
- scrub! (33)
- select (22)
-
set
_ backtrace (11) -
slice
_ when (11) - sort (22)
- split (17)
- subclasses (3)
-
take
_ while (44) - test (22)
-
to
_ binary (9) -
to
_ enum (33) -
to
_ h (12) -
to
_ s (5) -
undef
_ method (11) - unpack (11)
検索結果
先頭5件
-
Comparable
# <(other) -> bool (29212.0) -
比較演算子 <=> をもとにオブジェクト同士を比較します。 <=> が負の整数を返した場合に、true を返します。 それ以外の整数を返した場合に、false を返します。
... <=> をもとにオブジェクト同士を比較します。
<=> が負の整数を返した場合に、true を返します。
それ以外の整数を返した場合に、false を返します。
@param other 自身と比較したいオブジェクトを指定します。
@raise ArgumentError <......=> が nil を返したときに発生します。
//emlist[例][ruby]{
1 < 1 # => false
1 < 2 # => true
//}... -
Module
# <(other) -> bool | nil (26236.0) -
比較演算子。self が other の子孫である場合、 true を返します。 self が other の先祖か同一のクラス/モジュールである場合、false を返します。
...します。
//emlist[例][ruby]{
module Foo
end
class Bar
include Foo
end
class Baz < Bar
end
class Qux
end
p Bar < Foo # => true
p Baz < Bar # => true
p Baz < Foo # => true
p Baz < Qux # => nil
p Baz > Qux # => nil
p Foo < Object.new # => in `<': compared with non class/mod... -
Hash
# <(other) -> bool (26230.0) -
self が other のサブセットである場合に真を返します。
...サブセットである場合に真を返します。
@param other 自身と比較したい Hash オブジェクトを指定します。
//emlist[例][ruby]{
h1 = {a:1, b:2}
h2 = {a:1, b:2, c:3}
h1 < h2 # => true
h2 < h1 # => false
h1 < h1 # => false
//}
@see Hash#<=, Hash#>=, Hash#>... -
Integer
# <(other) -> bool (26212.0) -
比較演算子。数値として小さいか判定します。
...比較演算子。数値として小さいか判定します。
@param other 比較対象の数値
@return self よりも other が大きい場合 true を返します。
そうでなければ false を返します。
//emlist[][ruby]{
1 < 1 # => false
1 < 2 # => true
//}... -
Float
# <(other) -> bool (26206.0) -
比較演算子。数値として小さいか判定します。
...数値として小さいか判定します。
@param other 比較対象の数値
@return self よりも other が大きい場合 true を返します。
そうでなければ false を返します。
//emlist[例][ruby]{
3.14 < 3.1415 # => true
3.14 <= 3.1415 # => true
//}... -
Complex
# <(other) -> bool (26200.0) -
@undef
@undef -
Fixnum
# <(other) -> bool (26200.0) -
比較演算子。数値として小さいか判定します。
比較演算子。数値として小さいか判定します。
@param other 比較対象の数値
@return self よりも other が大きい場合 true を返します。
そうでなければ false を返します。 -
Bignum
# <<(bits) -> Fixnum | Bignum (17318.0) -
シフト演算子。bits だけビットを左にシフトします。
...シフト演算子。bits だけビットを左にシフトします。
@param bits シフトさせるビット数
printf("%#b\n", 0b0101 << 1) #=> 0b1010
p -1 << 1 #=> -2... -
Comparable
# <=(other) -> bool (17200.0) -
比較演算子 <=> をもとにオブジェクト同士を比較します。 <=> が負の整数か 0 を返した場合に、true を返します。 それ以外の整数を返した場合に、false を返します。
...比較演算子 <=> をもとにオブジェクト同士を比較します。
<=> が負の整数か 0 を返した場合に、true を返します。
それ以外の整数を返した場合に、false を返します。
@param other 自身と比較したいオブジェクトを指定します。......@raise ArgumentError <=> が nil を返したときに発生します。
//emlist[例][ruby]{
1 <= 0 # => false
1 <= 1 # => true
1 <= 2 # => true
//}... -
Object
# <=>(other) -> 0 | nil (17112.0) -
self === other である場合に 0 を返します。そうでない場合には nil を返します。
...self === other である場合に 0 を返します。そうでない場合には nil を返します。
//emlist[例][ruby]{
a = Object.new
b = Object.new
a <=> a # => 0
a <=> b # => nil
//}
@see Object#===... -
Bignum
# bit _ length -> Integer (17106.0) -
self を表すのに必要なビット数を返します。
...int < 0 ? -int : int+1)) と同じ結果
(-2**10000-1).bit_length # => 10001
(-2**10000).bit_length # => 10000
(-2**10000+1).bit_length # => 10000
(-2**1000-1).bit_length # => 1001
(-2**1000).bit_length # => 1000
(-2**1000+1).bit_length # => 1000
(2**1000-1).bit_......length # => 1000
(2**1000).bit_length # => 1001
(2**1000+1).bit_length # => 1001
(2**10000-1).bit_length # => 10000
(2**10000).bit_length # => 10001
(2**10000+1).bit_length # => 10001
@see Fixnum#bit_length... -
Thread
:: Backtrace :: Location # base _ label -> String (17106.0) -
self が表すフレームの基本ラベルを返します。通常、 Thread::Backtrace::Location#label から修飾を取り除いたもので構成 されます。
...read::Backtrace::Location#label から修飾を取り除いたもので構成
されます。
//emlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end
Foo.new(0..2).locations.map do |call|
puts call.base_label
end......# => initialize
# new
# <main>
//}
@see Thread::Backtrace::Location#label...