るりまサーチ

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

別のキーワード

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

モジュール

オブジェクト

キーワード

検索結果

<< 1 2 3 ... > >>

Integer#size -> Integer (53322.0)

整数の実装上のサイズをバイト数で返します。

...整数の実装上のサイズをバイト数で返します。

//emlist[][ruby]{
p 1.size # => 8
p 0x1_0000_0000.size # => 8
//}

@see Integer#bit_length...

Enumerator::ArithmeticSequence#size -> Integer | nil (35304.0)

有限なら要素数を返します。 そうでなければ nil を返します。

...有限なら要素数を返します。
そうでなければ nil を返します。

@return 要素数または nil を返します。...

Integer#bit_length -> Integer (35215.0)

self を表すのに必要なビット数を返します。

...self を表すのに必要なビット数を返します。

「必要なビット数」とは符号ビットを除く最上位ビットの位置の事を意味しま
す。2**n の場合は 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
-0x101.bit_length # => 9
-0x100.bit_length # => 8
-0xff.bit_length # => 8
-2.bit_length...
...# => 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...

Enumerator#size -> Integer | Float::INFINITY | nil (32322.0)

self の要素数を返します。

...elf の要素数を返します。

要素数が無限の場合は Float::INFINITY を返します。
E
numerator.new に Proc オブジェクトを指定していた場合はその
実行結果を返します。呼び出した時に要素数が不明であった場合は nil を返し
ます。

//e...
...mlist[例][ruby]{
(1..100).to_a.permutation(4).size # => 94109400
loop.size # => Float::INFINITY
(1..100).drop_while.size # => nil
//}

@see Enumerator.new...

Range#size -> Integer | Float::INFINITY | nil (32322.0)

範囲内の要素数を返します。始端、終端のいずれかのオブジェクトが Numeric のサブクラスのオブジェクトではない場合には nil を返します。

...を返します。始端、終端のいずれかのオブジェクトが
Numeric のサブクラスのオブジェクトではない場合には nil を返します。

//emlist[例][ruby]{
(10..20).size # => 11
("a".."z").size # => nil
(-Float::INFINITY..Float::INFINITY).size # => Infinity
//}...

絞り込み条件を変える

File.size(path) -> Integer (32320.0)

FileTest.#size と同じです。

...FileTest.#size と同じです。

@param path パスを表す文字列か IO オブジェクトを指定します。...

FileTest.#size(file) -> Integer (32316.0)

ファイルのサイズを返します。

...aram file ファイル名を表す文字列か IO オブジェクトを指定します。

@raise Errno::EXXX file が存在しない場合、あるいはシステムコールに失敗した場合に発生します。

@raise IOError 指定された IO オブジェクト file が既に close され...
...ていた場合に発生します。

@see FileTest.#size?, FileTest.#zero?

例:
FileTest.size('/etc/passwd') # => 5925...

File#size -> Integer (32310.0)

ファイルのサイズを返します。

...ファイルのサイズを返します。

//emlist[例][ruby]{
File.open("/dev/null") do |f|
f.size #=> 0
e
nd
//}

@raise IOError 自身が close されている場合に発生します。

@raise Errno::EXXX 失敗した場合に発生します。

@see File#lstat...

File::Stat#size -> Integer (32310.0)

ファイルサイズ(バイト単位)を返します。

...ファイルサイズ(バイト単位)を返します。

//emlist[][ruby]{
fs = File::Stat.new($0)
#例
p fs.size #=> 1548
//}...

ENV.size -> Integer (32305.0)

環境変数の数を返します。

環境変数の数を返します。

絞り込み条件を変える

<< 1 2 3 ... > >>