るりまサーチ

最速Rubyリファレンスマニュアル検索!
1450件ヒット [1-100件を表示] (0.245秒)

別のキーワード

  1. _builtin new
  2. _builtin inspect
  3. _builtin []
  4. _builtin to_s
  5. _builtin each

ライブラリ

クラス

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

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...
<< 1 2 3 ... > >>