380件ヒット
[201-300件を表示]
(0.070秒)
ライブラリ
- ビルトイン (260)
- bigdecimal (12)
- delegate (24)
-
irb
/ context (12) - psych (24)
-
rubygems
/ source _ index (12) -
rubygems
/ specification (12) -
rubygems
/ version (12) -
win32
/ registry (12)
クラス
- BigDecimal (12)
- Class (12)
- Complex (12)
- Delegator (24)
-
Encoding
:: Converter (72) -
Encoding
:: InvalidByteSequenceError (12) -
Encoding
:: UndefinedConversionError (12) -
Gem
:: SourceIndex (12) -
Gem
:: Specification (12) -
Gem
:: Version (12) -
IRB
:: Context (12) - Object (84)
-
Process
:: Status (12) - Random (24)
- Rational (12)
- String (32)
-
Win32
:: Registry (12)
キーワード
-
_ dump (48) -
_ load (12) - clone (12)
- convert (12)
- coredump? (12)
- dup (12)
-
error
_ bytes (12) -
error
_ char (12) -
insert
_ output (12) - inspect (12)
-
inspect
_ mode= (12) -
marshal
_ dump (72) -
marshal
_ load (36) -
primitive
_ convert (48) -
psych
_ to _ yaml (12) -
to
_ yaml (12) - undump (8)
検索結果
先頭5件
- Random
# marshal _ load(array) -> Random - Class
# _ load(str) -> Class - Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer) -> Symbol - Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset) -> Symbol - Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize) -> Symbol
-
Random
# marshal _ load(array) -> Random (35.0) -
Random#marshal_dump で得られた配列を基に、Randomオブジェクトを復元します。
...Random#marshal_dump で得られた配列を基に、Randomオブジェクトを復元します。
@param array 三要素以下からなる配列を指定します。
何を指定するかはRandom#marshal_dumpを参考にしてください。
@raise ArgumentError array が3より大......きい場合に発生します。
//emlist[例][ruby]{
r1 = Random.new(1)
a1 = r1.marshal_dump
r2 = Random.new(3)
r3 = r2.marshal_load(a1)
p r1 == r2 # => true
p r1 == r3 # => true
//}
@see Random#marshal_dump... -
Class
# _ load(str) -> Class (17.0) -
Object#_dump を参照して下さい。
...Object#_dump を参照して下さい。
@param str Ruby のオブジェクトがダンプされた文字列を指定します。... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer) -> Symbol (13.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...itive_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
ec.insert_output(ec.primitive_errinfo[3].dump[1..-2])
when :... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset) -> Symbol (13.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...itive_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
ec.insert_output(ec.primitive_errinfo[3].dump[1..-2])
when :... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize) -> Symbol (13.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...itive_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
ec.insert_output(ec.primitive_errinfo[3].dump[1..-2])
when :... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize , options) -> Symbol (13.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...itive_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
ec.insert_output(ec.primitive_errinfo[3].dump[1..-2])
when :... -
Encoding
:: InvalidByteSequenceError # error _ bytes -> String (13.0) -
エラー発生時に捨てられたバイト列を返します。
...\xFFdef")
rescue Encoding::InvalidByteSequenceError
p $!
#=> #<Encoding::InvalidByteSequenceError: "\xA1" followed by "\xFF" on EUC-JP>
puts $!.error_bytes.dump #=> "\xA1"
puts $!.readagain_bytes.dump #=> "\xFF"
end
//}
@see Encoding::InvalidByteSequenceError#readagain_bytes... -
Object
# clone(freeze: nil) -> object (13.0) -
オブジェクトの複製を作成して返します。
...y)といいます。
深い(deep)コピーが必要な場合には、
Marshalモジュールを利用して
//emlist[][ruby]{
Marshal.load(Marshal.dump(obj))
//}
このように複製を作成する方法があります。ただしMarshal出来ないオブジェクトが
含まれている場合に......は使えません。
//emlist[][ruby]{
obj = ["a","b","c"]
obj_d = obj.dup
obj_d[0] << "PLUS"
p obj #=> ["aPLUS", "b", "c"]
p obj_d #=> ["aPLUS", "b", "c"]
obj_m = Marshal.load(Marshal.dump(obj))
obj_m[1] << "PLUS"
p obj #=> ["aPLUS", "b", "c"]
p obj_m #=> ["aPLUS", "bPLUS", "c"]
//}... -
Object
# dup -> object (13.0) -
オブジェクトの複製を作成して返します。
...y)といいます。
深い(deep)コピーが必要な場合には、
Marshalモジュールを利用して
//emlist[][ruby]{
Marshal.load(Marshal.dump(obj))
//}
このように複製を作成する方法があります。ただしMarshal出来ないオブジェクトが
含まれている場合に......は使えません。
//emlist[][ruby]{
obj = ["a","b","c"]
obj_d = obj.dup
obj_d[0] << "PLUS"
p obj #=> ["aPLUS", "b", "c"]
p obj_d #=> ["aPLUS", "b", "c"]
obj_m = Marshal.load(Marshal.dump(obj))
obj_m[1] << "PLUS"
p obj #=> ["aPLUS", "b", "c"]
p obj_m #=> ["aPLUS", "bPLUS", "c"]
//}...