ライブラリ
- ビルトイン (44)
- dbm (11)
-
digest
/ sha1 (11) -
digest
/ sha2 (33) -
drb
/ gw (11) - gdbm (11)
- openssl (22)
- optparse (11)
- pstore (11)
-
rinda
/ rinda (11) - sdbm (11)
- uri (11)
-
webrick
/ httputils (11) - win32ole (11)
-
yaml
/ store (11)
検索結果
-
Hash (38031.0)
-
ハッシュテーブル(連想配列とも呼ぶ)のクラスです。ハッシュは任意の種類のオブ ジェクト(キー)から任意の種類のオブジェクト(値)への関連づけを行うことができます。
...クト(値)への関連づけを行うことができます。
ハッシュ生成は多くの場合以下のようなリテラル (d:spec/literal#hash) で行われます。
{a => b, ... } # aはキー、bは値となる
{s: b , ... } # { :s => b, ... } と同じ。キーがシンボル......ある必要があります。
* Object#hash ハッシュの格納に用いられるハッシュ値の計算
* Object#eql? キーの同一性判定
破壊的操作によってキーとして与えたオブジェクトの内容が変化し、Object#hash の返す
値が変わるとハッシュ......から値が取り出せなくなりますから、
Array、Hash
などのインスタンスはキーに向きません。Hash#rehash を参照。
ただし、 更新不可 (Object#frozen? が true) では無い文字列をキーとして与えた場合は、文字列をコピーし、コピーを... -
Rinda
:: InvalidHashTupleKey (6001.0) -
Rinda::TupleSpace#write などで不正なハッシュテーブル(キーが 文字列でないもの)をタプルスペースに書き込もうとすると発生すると発生する 例外です。
Rinda::TupleSpace#write などで不正なハッシュテーブル(キーが
文字列でないもの)をタプルスペースに書き込もうとすると発生すると発生する
例外です。 -
Enumerator
:: Lazy (37.0) -
map や select などのメソッドの遅延評価版を提供するためのクラス。
...、
# 巨大な配列を確保しようとしてメモリを使い切ったりはしない
open("log.txt"){|f|
f.each_line.lazy.map{|line|
Hash[line.split(/\t/).map{|s| s.split(/:/, 2)}]
}.select{|hash|
hash["req"] =~ /GET/ && hash["status"] == "200"
}.each{|hash|
p hash
}
}
//}... -
Digest
:: SHA1 (17.0) -
NIST (the US' National Institute of Standards and Technology) の SHA-1 Secure Hash Algorithmを実装するクラスです。 FIPS PUB 180-1に記述されています。
...NIST (the US' National Institute of Standards and Technology) の
SHA-1 Secure Hash Algorithmを実装するクラスです。
FIPS PUB 180-1に記述されています。... -
Digest
:: SHA256 (17.0) -
FIPS PUB 180-2に記述されているNIST (the US' National Institute of Standards and Technology) の SHA-256 Secure Hash Algorithmを 実装するクラスです。
...FIPS PUB 180-2に記述されているNIST (the US' National Institute of
Standards and Technology) の SHA-256 Secure Hash Algorithmを
実装するクラスです。... -
Digest
:: SHA384 (17.0) -
FIPS PUB 180-2に記述されているNIST (the US' National Institute of Standards and Technology) の SHA-384 Secure Hash Algorithmを 実装するクラスです。
...FIPS PUB 180-2に記述されているNIST (the US' National Institute of
Standards and Technology) の SHA-384 Secure Hash Algorithmを
実装するクラスです。... -
Digest
:: SHA512 (17.0) -
FIPS PUB 180-2に記述されているNIST (the US' National Institute of Standards and Technology) の SHA-512 Secure Hash Algorithmを 実装するクラスです。
...FIPS PUB 180-2に記述されているNIST (the US' National Institute of
Standards and Technology) の SHA-512 Secure Hash Algorithmを
実装するクラスです。... -
KeyError (17.0)
-
Hash#fetch などで key に対応する value がない場合に発生します。
...Hash#fetch などで key に対応する value がない場合に発生します。
Ruby 1.8 以前では同様の場面で IndexError が発生していました。
互換性のため、KeyError は IndexError のサブクラスになっています。... -
OpenSSL
:: X509 :: Name (13.0) -
X.500の識別名(DN, Distinguished Name)を表わすクラス。
...X.500の識別名(DN, Distinguished Name)を表わすクラス。
eql? と hash が定義されているため、Hash のキーとして
利用できます。... -
SDBM (13.0)
-
SDBM ファイルをアクセスするクラス。
...SDBM ファイルをアクセスするクラス。
キー、データともに文字列でなければならないという制限と、
データがファイルに保存されるという点を除いては Hash クラスと
全く同様に扱うことができます。
@see Hash...