るりまサーチ (Ruby 2.5.0)

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

別のキーワード

  1. _builtin hash
  2. hash []
  3. matrix hash
  4. dbm to_hash
  5. _builtin to_hash

モジュール

キーワード

検索結果

Hash#size -> Integer (108346.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 (63046.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
//}

Method#hash -> Integer (18364.0)

自身のハッシュ値を返します。

自身のハッシュ値を返します。


//emlist[例][ruby]{
a = method(:==)
b = method(:eql?)
p a.eql? b # => true
p a.hash == b.hash # => true
p [a, b].uniq.size # => 1
//}

UnboundMethod#hash -> Integer (18364.0)

自身のハッシュ値を返します。

自身のハッシュ値を返します。


//emlist[例][ruby]{
a = method(:==).unbind
b = method(:eql?).unbind
p a.eql? b # => true
p a.hash == b.hash # => true
p [a, b].uniq.size # => 1
//}

GC::Profiler.raw_data -> [Hash, ...] | nil (430.0)

GC のプロファイル情報を GC の発生ごとに Hash の配列 (:GC_INVOKE_TIME が早いもの順)で返します。GC::Profiler が有効になっ ていない場合は nil を返します。

GC のプロファイル情報を GC の発生ごとに 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.010634999999999999,
:HEAP_USE_SIZE=>289640,
...

絞り込み条件を変える

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

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

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

可搬性を確保しつつ、不正なバイトや変換先で未定義な文字の扱いを細かに指定したいときは、Encoding::Converter#primitive_convert が唯一の方法になります。

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

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

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

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

可搬性を確保しつつ、不正なバイトや変換先で未定義な文字の扱いを細かに指定したいときは、Encoding::Converter#primitive_convert が唯一の方法になります。

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

RubyVM::InstructionSequence#to_a -> Array (97.0)

self の情報を 14 要素の配列にして返します。

...ンドの配列の配列。


//emlist[例][ruby]{
require 'pp'

iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
pp iseq.to_a
# ※ Ruby 2.5.0 での実行結果
# => ["YARVInstructionSequence/SimpleDataFormat",
# 2,
# 0,
# 1,
# {:arg_size=>0, :local_size=>2, :stack_max=>2},
# "<compiled>"...

Numeric (43.0)

数値を表す抽象クラスです。Integer や Float などの数値クラス は Numeric のサブクラスとして実装されています。

数値を表す抽象クラスです。Integer や Float などの数値クラス
は Numeric のサブクラスとして実装されています。

演算や比較を行うメソッド(+, -, *, /, <=>)は Numeric のサブクラスで定義されま
す。Numeric で定義されているメソッドは、サブクラスで提供されているメソッド
(+, -, *, /, %) を利用して定義されるものがほとんどです。
つまり Numeric で定義されているメソッドは、Numeric のサブクラスとして新たに数値クラスを定義した時に、
演算メソッド(+, -, *, /, %, <=>, coerce)だけを定義すれ...