るりまサーチ

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

別のキーワード

  1. openssl integer
  2. asn1 integer
  3. _builtin integer
  4. integer new
  5. integer times

ライブラリ

検索結果

<< 1 2 3 ... > >>

Integer#prime_division(generator = Prime::Generator23.new) -> [[Integer, Integer]] (27403.0)

自身を素因数分解した結果を返します。

...、第2要素は n**e が self を割り切る最大の自然数 e です。

@raise ZeroDivisionError self がゼロである場合に発生します。

@see Prime#prime_division

//emlist[例][ruby]{
require 'prime'
12.prime_division #=> [[2,2], [3,1]]
10.prime_division #=> [[2,1], [5,1]]
//}...

Kernel.#Integer(arg, base = 0, exception: true) -> Integer | nil (18464.0)

引数を整数(Fixnum,Bignum)に変換した結果を返します。

...フィクスは、0b
(2 進数)、0 (8 進数)、0o (8 進数)、0d (10 進数)、0x (16 進
数) です。

@param exception false を指定すると、変換できなかった場合、
例外を発生する代わりに nil を返します。

@raise Argumen...
...数(Integerのサブクラス)を返さなかった場合に発生します。
@raise TypeError 引数に nil を指定した場合に発生します。

//emlist[例][ruby]{
p Integer(4) #=> 4
p Integer(4_000) #=> 4000
p Integer(9.88) #=> 9

p Integer(nil) # can't convert...
...nil into Integer (TypeError)
p Integer(Object.new) # cannot convert Object into Integer (TypeError)

p Integer("10") #=> 10
p Integer("10", 2) #=> 2
p Integer("0d10") #=> 10
p Integer("010") #=> 8
p Integer("0o10") #=> 8
p Integer("0x10") #=> 16
p Integer("0b10") #=> 2...

Regexp.new(string, option = nil, code = nil) -> Regexp (15207.0)

文字列 string をコンパイルして正規表現オブジェクトを生成して返します。

...@param string 正規表現を文字列として与えます。

@param option Regexp::IGNORECASE, Regexp::MULTILINE,
Regexp::EXTENDED
の論理和を指定します。
Integer
以外であれば真偽値の指定として見なされ
、真(n...

JSON::Generator::GeneratorMethods::Integer#to_json(state_or_hash = nil) -> String (12106.0)

自身から生成した JSON 形式の文字列を返します。

...自身から生成した JSON 形式の文字列を返します。

@param state_or_hash 生成する JSON 形式の文字列をカスタマイズするため
に JSON::State のインスタンスか、
JSON::State.new の引数と同じ Hash を...
...指定します。

//emlist[例][ruby]{
require "json"

10.to_json # => "10"
//}...

Encoding::Converter#primitive_convert(source_buffer, destination_buffer, destination_byteoffset, destination_bytesize, options) -> Symbol (9512.0)

エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。

...coding::Converter#primitive_convert が唯一の方法になります。

@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesiz...
...mbol

options には以下が指定できます。

: hash form
:partial_input => true # source buffer may be part of larger source
:after_output => true # stop conversion after output before input
: integer form
Encoding::Converter::PARTIAL_INPUT
Encoding::Converter::AF...
...omplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full
* :source_buffer_empty
* :finished

//emlist[][ruby]{
ec = Encoding::Converter.new("UTF-8", "EUC-JP")
src = "abc\x81あいう\u{20bb7}\xe3"
dst = ''

begin
ret = ec.primitive_convert(src, dst)
p [ret, src,...

絞り込み条件を変える

Encoding::Converter#primitive_convert(source_buffer, destination_buffer, destination_byteoffset, destination_bytesize) -> Symbol (9412.0)

エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。

...coding::Converter#primitive_convert が唯一の方法になります。

@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesiz...
...mbol

options には以下が指定できます。

: hash form
:partial_input => true # source buffer may be part of larger source
:after_output => true # stop conversion after output before input
: integer form
Encoding::Converter::PARTIAL_INPUT
Encoding::Converter::AF...
...omplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full
* :source_buffer_empty
* :finished

//emlist[][ruby]{
ec = Encoding::Converter.new("UTF-8", "EUC-JP")
src = "abc\x81あいう\u{20bb7}\xe3"
dst = ''

begin
ret = ec.primitive_convert(src, dst)
p [ret, src,...

Encoding::Converter#primitive_convert(source_buffer, destination_buffer, destination_byteoffset) -> Symbol (9312.0)

エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。

...coding::Converter#primitive_convert が唯一の方法になります。

@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesiz...
...mbol

options には以下が指定できます。

: hash form
:partial_input => true # source buffer may be part of larger source
:after_output => true # stop conversion after output before input
: integer form
Encoding::Converter::PARTIAL_INPUT
Encoding::Converter::AF...
...omplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full
* :source_buffer_empty
* :finished

//emlist[][ruby]{
ec = Encoding::Converter.new("UTF-8", "EUC-JP")
src = "abc\x81あいう\u{20bb7}\xe3"
dst = ''

begin
ret = ec.primitive_convert(src, dst)
p [ret, src,...

WEBrick::HTTPResponse#content_length -> Integer | nil (9213.0)

Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。

...Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。

: body が String オブジェクトである場合
content_length の値が nil のとき Content-Length ヘッダには
body のサイズが使われます。nil でないとき body の実...
...IO オブジェクトである場合
content_length の値が nil のとき Content-Length ヘッダはレスポンスに含まれず、IO から全てを読み込ん
でそれをエンティティボディとします。nil でないとき IO から content_length バイトだけ読み込み...
...
エンティティボディとします。

また 2616 4.4 で定められた Content-Length ヘッダを送ってはいけない場合に当てはまる時には
content_length の値は無視され Content-Length ヘッダはレスポンスに含まれません。

@param len ヘッダの...

Encoding::Converter#primitive_convert(source_buffer, destination_buffer) -> Symbol (9212.0)

エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。

...coding::Converter#primitive_convert が唯一の方法になります。

@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesiz...
...mbol

options には以下が指定できます。

: hash form
:partial_input => true # source buffer may be part of larger source
:after_output => true # stop conversion after output before input
: integer form
Encoding::Converter::PARTIAL_INPUT
Encoding::Converter::AF...
...omplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full
* :source_buffer_empty
* :finished

//emlist[][ruby]{
ec = Encoding::Converter.new("UTF-8", "EUC-JP")
src = "abc\x81あいう\u{20bb7}\xe3"
dst = ''

begin
ret = ec.primitive_convert(src, dst)
p [ret, src,...

WEBrick::HTTPResponse#content_length=(len) (9113.0)

Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。

...Content-Length ヘッダの値を整数で表すアクセサです。デフォルトは nil です。

: body が String オブジェクトである場合
content_length の値が nil のとき Content-Length ヘッダには
body のサイズが使われます。nil でないとき body の実...
...IO オブジェクトである場合
content_length の値が nil のとき Content-Length ヘッダはレスポンスに含まれず、IO から全てを読み込ん
でそれをエンティティボディとします。nil でないとき IO から content_length バイトだけ読み込み...
...
エンティティボディとします。

また 2616 4.4 で定められた Content-Length ヘッダを送ってはいけない場合に当てはまる時には
content_length の値は無視され Content-Length ヘッダはレスポンスに含まれません。

@param len ヘッダの...

絞り込み条件を変える

<< 1 2 3 ... > >>