449件ヒット
[401-449件を表示]
(0.035秒)
クラス
-
Encoding
:: Converter (24) -
Encoding
:: InvalidByteSequenceError (36) - Random (19)
- String (202)
- StringIO (28)
- StringScanner (24)
-
WIN32OLE
_ VARIANT (24)
モジュール
-
OpenSSL
:: Random (24) - SecureRandom (12)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - Marshal フォーマット (12)
-
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 2
. 6 . 0 (7) - SecureRandom (12)
- Symbol (1)
- byterindex (3)
- bytesize (12)
- byteslice (36)
- bytesplice (10)
-
destination
_ encoding _ name (12) -
each
_ byte (38) -
error
_ bytes (12) - getbyte (12)
- new (21)
- peek (12)
- peep (12)
-
pseudo
_ bytes (12) - putback (24)
-
random
_ bytes (24) -
readagain
_ bytes (12) - scrub (36)
- scrub! (36)
- vartype (12)
検索結果
先頭5件
-
Marshal フォーマット (54.0)
-
Marshal フォーマット フォーマットバージョン 4.8 を元に記述しています。
...対しては、以下の形式になります。
==== 形式 2
//emlist{
| len | n_1 | n_2 | n_3 | n_4 |
<-1-> <- len ->
byte bytes
//}
len の値は -4 〜 -1, 1 〜 4 で。符号と後続のデータが n1 〜 n_len
まであることを示します。
//emlist[][rub......ss
==== String, Regexp, Array, Hash のサブクラス (インスタンス変数なし)
'C' で始まるデータ構造になります。
//emlist{
| 'C' | クラス名(Symbol)の dump | 親クラスのインスタンスの dump |
//}
//emlist[例 1][ruby]{
class Foo < Array # (or String, Regexp......//}
==== String, Regexp, Array, Hash のサブクラス (インスタンス変数あり)
'I' で始まるデータ構造になります。
d:marshal_format#instance_variableも参照してください。
//emlist[例 2: インスタンス変数あり][ruby]{
class Foo < Array # (or String, Regexp... -
SecureRandom (30.0)
-
安全な乱数発生器のためのインターフェースを提供するモジュールです。 HTTP のセッションキーなどに適しています。
...m
上の安全な乱数発生器が使用できない場合、各メソッドは NotImplementedError を発生します。
# random hexadecimal string.
require 'securerandom'
p SecureRandom.hex(10) #=> "52750b30ffbc7de3b362"
p SecureRandom.hex(10) #=> "92b15d6c8dc4beb5f559"
p SecureRando......8e4863e6b81b8"
p SecureRandom.hex(12) #=> "94b2fff3e7fd9b9c391a2306"
p SecureRandom.hex(13) #=> "39b290146bea6ce975c37cfc23"
# random base64 string.
require 'securerandom'
p SecureRandom.base64(10) #=> "EcmTPZwWRAozdA=="
p SecureRandom.base64(10) #=> "9b0nsevdwNuM/w=="
p SecureRandom.......EKEtY="
p SecureRandom.base64(12) #=> "7kJSM/MzBJI+75j8"
p SecureRandom.base64(13) #=> "vKLJ0tXBHqQOuIcSIg=="
# random binary string.
require 'securerandom'
p SecureRandom.random_bytes(10) #=> "\016\t{\370g\310pbr\301"
p SecureRandom.random_bytes(10) #=> "\323U\030TO\234\357\020\a\337"... -
Symbol (24.0)
-
シンボルを表すクラス。シンボルは任意の文字列と一対一に対応するオブジェクトです。
...きません(そうでなければ文法エラーになります)。
そうでない文字列をシンボルにしたい場合は残りの表記か String#intern を使用してください。
=== シンボルの実装と用途
==== 実装
Rubyの内部実装では、メソッド名や変数名、......ンボルの代わりに文字列を引数として渡すこともできるようになっています。
Symbol クラスのメソッドには、String クラスのメソッドと同名で似た働きをするものもあります。
==== GC
内部的にシンボルは
* シンボルの情報......000.times { rng.bytes(1000).intern }
はテーブルのサイズを増大させ、メモリを圧迫します。
例えば web アプリケーションのようなプロセスを動かしつづけるような
アプリケーションにおいて、ユーザからの入力を String#intern で
シ... -
WIN32OLE
_ VARIANT . new(val , vartype = nil) -> WIN32OLE _ VARIANT (24.0) -
指定したオブジェクトを値とするWIN32OLE_VARIANTオブジェクトを生成します。
...さい。
@return val引数を値として持つWIN32OLE_VARIANTオブジェクトを返します。
@raise TypeError val引数の型がArray、String、Integer、Float、Time、
WIN32OLE、WIN32OLE_VARIANT、TrueClass、FalseClass、
NilClass のいずれでもあ......ンコーディングをASCII-8BITに設
定した文字列となります。
include WIN32OLE::VARIANT
bytes = WIN32OLE_VARIANT.new([1,2,3,4,5], VT_UI1 | VT_ARRAY)
bytes.value #=> "\x01\x02\x03\x04\x05"
bytes.value.encoding #=> #<Encoding:ASCII-8BIT>
@see WIN32OLE::VARIANT... -
WIN32OLE
_ VARIANT # vartype -> Integer (18.0) -
selfの型情報を取得します。
...型情報は、WIN32OLE::VARIANTの定数値の組み合わせです。
obj = WIN32OLE_VARIANT.new("string")
obj.vartype # => 8 (WIN32OLE::VARIANT::VT_BSTR)
bytes = WIN32OLE_VARIANT.new([1,2,3,4,5], VT_UI1 | VT_ARRAY)
bytes.vartype # => 8209 (WIN32OLE::VARIANT::VT_ARRAY | VT_UI1)...