83件ヒット
[1-83件を表示]
(0.110秒)
種類
- インスタンスメソッド (44)
- 特異メソッド (17)
- 定数 (11)
- モジュール関数 (11)
クラス
- CSV (11)
-
Encoding
:: Converter (22) - Hash (22)
モジュール
-
GC
:: Profiler (11) - ObjectSpace (11)
オブジェクト
- ENV (6)
キーワード
-
DEFAULT
_ OPTIONS (11) -
count
_ objects _ size (11) - length (11)
-
primitive
_ convert (22) -
raw
_ data (11) -
to
_ h (6)
検索結果
先頭5件
-
Hash
# size -> Integer (27213.0) -
ハッシュの要素の数を返します。
...ハッシュの要素の数を返します。
//emlist[][ruby]{
h = { "d" => 100, "a" => 200, "v" => 300, "e" => 400 }
h.length #=> 4
h.size #=> 4
h.delete("a") #=> 200
h.length #=> 3
h.size #=> 3
//}... -
Hash
# length -> Integer (15213.0) -
ハッシュの要素の数を返します。
...ハッシュの要素の数を返します。
//emlist[][ruby]{
h = { "d" => 100, "a" => 200, "v" => 300, "e" => 400 }
h.length #=> 4
h.size #=> 4
h.delete("a") #=> 200
h.length #=> 3
h.size #=> 3
//}... -
ObjectSpace
. # count _ objects _ size(result _ hash = nil) -> Hash (6527.0) -
型ごとのオブジェクトサイズをバイト単位で格納したハッシュを返します。
...イト単位で格納したハッシュを返します。
@param result_hash 戻り値のためのハッシュを指定します。省略した場合は新
しくハッシュを作成します。result_hash の内容は上書き
されます。プローブ効......。特に T_DATA の合計値は正しくないでしょう。
//emlist[例][ruby]{
ObjectSpace.count_objects_size
# => {:TOTAL=>1461154, :T_CLASS=>158280, :T_MODULE=>20672, :T_STRING=>527249, ...}
//}
@raise TypeError result_hash にハッシュ以外を指定した時に発生します。
戻... -
CSV
:: DEFAULT _ OPTIONS -> Hash (6307.0) -
このオプションは呼び出し側で上書きしなかったときに使用するオプションです。
...るオプションです。
: :col_sep
","
: :row_sep
:auto
: :quote_char
'"'
: :field_size_limit
nil
: :converters
nil
: :unconverted_fields
nil
: :headers
false
: :return_headers
false
: :header_converters
nil
: :skip_blanks
false
: :force_quotes
false
: :skip_lines
nil... -
GC
:: Profiler . raw _ data -> [Hash , . . . ] | nil (3341.0) -
GC のプロファイル情報を GC の発生ごとに Hash の配列 (:GC_INVOKE_TIME が早いもの順)で返します。GC::Profiler が有効になっ ていない場合は nil を返します。
...に Hash の配列
(:GC_INVOKE_TIME が早いもの順)で返します。GC::Profiler が有効になっ
ていない場合は nil を返します。
例:
GC::Profiler.enable
GC.start
GC::Profiler.raw_data
# => [
{
:GC_TIME=>1.3000000000000858e-05,
:GC_INVOKE_TIME=>0.0106......34999999999999,
:HEAP_USE_SIZE=>289640,
:HEAP_TOTAL_SIZE=>588960,
:HEAP_TOTAL_OBJECTS=>14724,
:GC_IS_MARKED=>false
},
# ...
]
各項目の意味を以下に示します。
: :GC_TIME
GC の処理時間(秒)
: :GC_INVOKE_TIME
Ruby が起動してから G......P_USE_SIZE
ヒープ内での使用サイズ(バイト)
: :HEAP_TOTAL_SIZE
ヒープ全体のサイズ(バイト)
: :HEAP_TOTAL_OBJECTS
ヒープ内に存在するオブジェクトの個数
: :GC_IS_MARKED
GC がマークフェイズかどうか
また、GC_PROFILE_MORE_DETAIL を... -
ENV
. to _ h {|name , value| block } -> Hash (308.0) -
環境変数の名前をキーとし、対応する値をもつハッシュを返します。
...変数の名前をキーとし、対応する値をもつハッシュを返します。
ブロックを指定すると各ペアでブロックを呼び出し、
その結果をペアとして使います。
//emlist[ブロック付きの例][ruby]{
ENV.to_h {|name, value| [name, value.size] }
//}... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize) -> Symbol (306.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...tesize 変換先バッファの容量
@param options 変換の詳細を指定する定数やハッシュ
@return 変換結果を表す Symbol
options には以下が指定できます。
: hash form
:partial_input => true # source buffer may be part of larger source
:after_output =>......::Converter::PARTIAL_INPUT
Encoding::Converter::AFTER_OUTPUT
戻り値は以下のうちのどれかです。
* :invalid_byte_sequence
* :incomplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full
* :source_buffer_empty
* :finished
//emlist[][ruby]{
ec = E......et
when :invalid_byte_sequence
ec.insert_output(ec.primitive_errinfo[3].dump[1..-2])
redo
when :undefined_conversion
c = ec.primitive_errinfo[3].dup.force_encoding(ec.primitive_errinfo[1])
ec.insert_output('\x{%X:%s}' % [c.ord, c.encoding])
redo
when :incomplete_input
e... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize , options) -> Symbol (306.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...tesize 変換先バッファの容量
@param options 変換の詳細を指定する定数やハッシュ
@return 変換結果を表す Symbol
options には以下が指定できます。
: hash form
:partial_input => true # source buffer may be part of larger source
:after_output =>......::Converter::PARTIAL_INPUT
Encoding::Converter::AFTER_OUTPUT
戻り値は以下のうちのどれかです。
* :invalid_byte_sequence
* :incomplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full
* :source_buffer_empty
* :finished
//emlist[][ruby]{
ec = E......et
when :invalid_byte_sequence
ec.insert_output(ec.primitive_errinfo[3].dump[1..-2])
redo
when :undefined_conversion
c = ec.primitive_errinfo[3].dup.force_encoding(ec.primitive_errinfo[1])
ec.insert_output('\x{%X:%s}' % [c.ord, c.encoding])
redo
when :incomplete_input
e...