54件ヒット
[1-54件を表示]
(0.152秒)
種類
- インスタンスメソッド (28)
- 文書 (15)
- クラス (11)
ライブラリ
- ビルトイン (39)
キーワード
-
NEWS for Ruby 2
. 1 . 0 (11) -
NEWS for Ruby 3
. 0 . 0 (4) - Numeric (11)
- size (11)
検索結果
先頭5件
-
Integer
# bit _ length -> Integer (50636.0) -
self を表すのに必要なビット数を返します。
...や
-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_......# => 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... -
Fixnum
# bit _ length -> Integer (30648.0) -
self を表すのに必要なビット数を返します。
...
-1 である)場合は 0 を返します。
例: ceil(log2(int < 0 ? -int : int+1)) と同じ結果
(-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_l......# => 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 Bignum#bit_length... -
Bignum
# bit _ length -> Integer (30594.0) -
self を表すのに必要なビット数を返します。
...(0 や
-1 である)場合は 0 を返します。
例: ceil(log2(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 #......(-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... -
Integer
# size -> Integer (26212.0) -
整数の実装上のサイズをバイト数で返します。
...整数の実装上のサイズをバイト数で返します。
//emlist[][ruby]{
p 1.size # => 8
p 0x1_0000_0000.size # => 8
//}
@see Integer#bit_length... -
Numeric (8202.0)
-
数値を表す抽象クラスです。Integer や Float などの数値クラス は Numeric のサブクラスとして実装されています。
...値を表す抽象クラスです。Integer や Float などの数値クラス
は Numeric のサブクラスとして実装されています。
演算や比較を行うメソッド(+, -, *, /, <=>)は Numeric のサブクラスで定義されま
す。Numeric で定義されているメソッド......o - - - - - o
angle | o - - - o - o
arg | o - - - o - o
bit_length | -......o - - -
ceil | o o - - o o -
chr | - o - - - - -
coerce | o - -......bs2 | o - - - o
angle | o - o - o
arg | o - o - o
bit_length | - o - - -......ceil | o o o o -
chr | - o - - -
coerce | o o o o o
conj | o - - - o... -
NEWS for Ruby 3
. 0 . 0 (318.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...positional arguments.
Code that resulted in deprecation warnings in Ruby 2.7 will now
result in ArgumentError or different behavior. 14183
* Procs accepting a single rest argument and keywords are no longer
subject to autosplatting. This now matches the behavior of Procs
accepting......tion warning
# 3.0 => a=>1}, {}]
//}
* Arguments forwarding (`...`) now supports leading arguments.
16378
//emlist{
def method_missing(meth, ...)
send(:"do_#{meth}", ...)
end
//}
* Pattern matching (`case/in`) is no longer experimental. 17260
* One-line pattern matching is redesig......ironment variable `RUBY_PAGER` or `PAGER` is present and has
a non-empty value, and the standard input and output are tty, the `--help`
option shows the help message via the pager designated by the value.
16754
=== `--backtrace-limit` option
The `--backtrace-limit` option limits the maximum length... -
NEWS for Ruby 2
. 1 . 0 (126.0) -
NEWS for Ruby 2.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリストは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。
== 2.0.0 以降の変更
=== 言語仕様の変更
* キーワード引数のデフォルト値が省......LLOC_LIMIT_MAX
* RUBY_GC_OLDMALLOC_LIMIT_GROWTH_FACTOR
* 廃止した環境変数
* RUBY_FREE_MIN (RUBY_GC_HEAP_FREE_SLOTS を代わりに使います)
* RUBY_HEAP_MIN_SLOTS (RUBY_GC_HEAP_INIT_SLOTS を代わりに使います)
* Integer
* 追加: Fixnum#bit_length
*......加: Bignum#bit_length
* Bignum の性能向上
* GMP をいくつかの操作で使えるときは使います。
乗算、除算、基数変換、GCD
* IO
* 拡張: IO#seek SEEK_DATA と SEEK_HOLE を whence としてサポートしました??
* 拡張: IO#seek 第...