404件ヒット
[1-100件を表示]
(0.038秒)
種類
- インスタンスメソッド (278)
- 文書 (82)
- モジュール関数 (22)
- クラス (11)
- ライブラリ (11)
ライブラリ
- ビルトイン (234)
- fiddle (11)
- ipaddr (11)
- logger (11)
-
rexml
/ document (33) -
rubygems
/ dependency (11)
クラス
- Array (37)
- Bignum (3)
-
Fiddle
:: Pointer (11) -
File
:: Stat (11) - Fixnum (3)
-
Gem
:: Dependency (11) - IO (8)
- IPAddr (11)
- Integer (77)
- Logger (11)
- Module (16)
- Numeric (11)
-
REXML
:: Attributes (22) -
REXML
:: Elements (11) - String (35)
モジュール
- Kernel (22)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - << (38)
- <= (11)
- <=> (66)
- Marshal フォーマット (11)
-
NEWS for Ruby 2
. 4 . 0 (8) -
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 1 . 0 (3) - Numeric (11)
- bigdecimal (11)
-
bit
_ length (17) -
bsearch
_ index (18) - concat (16)
-
const
_ source _ location (5) - div (11)
- downto (22)
- length (11)
- pack (19)
- pack テンプレート文字列 (11)
-
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 2 feature (11) -
ruby 1
. 8 . 4 feature (11) - size (22)
- test (22)
- unpack (11)
検索結果
先頭5件
-
Integer
# <(other) -> bool (39112.0) -
比較演算子。数値として小さいか判定します。
...比較演算子。数値として小さいか判定します。
@param other 比較対象の数値
@return self よりも other が大きい場合 true を返します。
そうでなければ false を返します。
//emlist[][ruby]{
1 < 1 # => false
1 < 2 # => true
//}... -
Integer
# <<(bits) -> Integer (27201.0) -
シフト演算子。bits だけビットを左にシフトします。
...シフト演算子。bits だけビットを左にシフトします。
@param bits シフトさせるビット数
//emlist[][ruby]{
printf("%#b\n", 0b0101 << 1) # => 0b1010
p -1 << 1 # => -2
//}... -
Integer
# <=(other) -> bool (27100.0) -
比較演算子。数値として等しいまたは小さいか判定します。
...other 比較対象の数値
@return self よりも other の方が大きい場合か、
両者が等しい場合 true を返します。
そうでなければ false を返します。
//emlist[][ruby]{
1 <= 0 # => false
1 <= 1 # => true
1 <= 2 # => true
//}... -
Integer
# <=>(other) -> -1 | 0 | 1 | nil (27100.0) -
self と other を比較して、self が大きい時に1、等しい時に 0、小さい時 に-1、比較できない時に nil を返します。
...、self が大きい時に1、等しい時に 0、小さい時
に-1、比較できない時に nil を返します。
@param other 比較対象の数値
@return -1 か 0 か 1 か nil のいずれか
//emlist[][ruby]{
1 <=> 2 # => -1
1 <=> 1 # => 0
2 <=> 1 # => 1
2 <=> '' # => nil
//}... -
Integer
# bit _ length -> Integer (21113.0) -
self を表すのに必要なビット数を返します。
...合は n+1 になります。self にそのようなビットがない(0 や
-1 である)場合は 0 を返します。
//emlist[例: ceil(log2(int < 0 ? -int : int+1)) と同じ結果][ruby]{
(-2**12-1).bit_length # => 13
(-2**12).bit_length # => 12
(-2**12+1).bit_length # => 12
-0x......# => 1
-1.bit_length # => 0
0.bit_length # => 0
1.bit_length # => 1
0xff.bit_length # => 8
0x100.bit_length # => 9
(2**12-1).bit_length # => 12
(2**12).bit_length # => 13
(2**12+1).bit_length # => 13
//}
@see Integer#size... -
Integer
# downto(min) -> Enumerator (21028.0) -
self から min まで 1 ずつ減らしながらブロックを繰り返し実行します。 self < min であれば何もしません。
...で 1 ずつ減らしながらブロックを繰り返し実行します。
self < min であれば何もしません。
@param min 数値
@return self を返します。
//emlist[][ruby]{
5.downto(1) {|i| print i, " " } # => 5 4 3 2 1
//}
@see Integer#upto, Numeric#step, Integer#times... -
Integer
# downto(min) {|n| . . . } -> self (21028.0) -
self から min まで 1 ずつ減らしながらブロックを繰り返し実行します。 self < min であれば何もしません。
...で 1 ずつ減らしながらブロックを繰り返し実行します。
self < min であれば何もしません。
@param min 数値
@return self を返します。
//emlist[][ruby]{
5.downto(1) {|i| print i, " " } # => 5 4 3 2 1
//}
@see Integer#upto, Numeric#step, Integer#times... -
IPAddr
# <=>(other) -> Integer | nil (6213.0) -
self と other を比較します。
...の IPAddr オブジェクト。
@return self と other のアドレスファミリが一致しない場合は nil を返します。
アドレスファミリが一致する場合は、両方の数値表現を Integer#<=>
で比較した結果を返します。
@see Integer#<=>... -
Module
# <=>(other) -> Integer | nil (6207.0) -
self と other の継承関係を比較します。
...のクラスやモジュール
//emlist[例][ruby]{
module Foo
end
class Bar
include Foo
end
class Baz < Bar
end
class Qux
end
p Bar <=> Foo # => -1
p Baz <=> Bar # => -1
p Baz <=> Foo # => -1
p Baz <=> Qux # => nil
p Qux <=> Baz # => nil
p Baz <=> Object.new # => nil
//}... -
Fiddle
:: Pointer # <=>(other) -> Integer (6201.0) -
ポインタの指すアドレスの大小を比較します。
ポインタの指すアドレスの大小を比較します。
other より小さい場合は -1, 等しい場合は 0、other より大きい場合は
1を返します。
@param other 比較対象の Pointer オブジェクト