るりまサーチ

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

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. matrix t
  4. t61string new
  5. fiddle type_size_t

ライブラリ

キーワード

検索結果

<< 1 2 3 > >>

String#dump -> String (21230.0)

文字列中の非表示文字をバックスラッシュ記法に置き換えた文字列を返します。 str == eval(str.dump) となることが保証されています。

...に置き換えた文字列を返します。
str == eval(str.dump) となることが保証されています。

//emlist[例][ruby]{
# p だとさらにバックスラッシュが増えて見にくいので puts している
puts "abc\r\n\f\x00\b10\\\"".dump # => "abc\r\n\f\x00\b10\\\""
//}...
...文字列を返します。
str == eval(str.dump) となることが保証されています。

//emlist[例][ruby]{
# p だとさらにバックスラッシュが増えて見にくいので puts している
puts "abc\r\n\f\x00\b10\\\"".dump # => "abc\r\n\f\x00\b10\\\""
//}

@see String#undump...

Object#_dump(limit) -> String (9336.0)

Marshal.#dump において出力するオブジェクトがメソッド _dump を定義している場合には、そのメソッドの結果が書き出されます。

...Marshal.#dump において出力するオブジェクトがメソッド _dump
を定義している場合には、そのメソッドの結果が書き出されます。

バージョン1.8.0以降ではObject#marshal_dump, Object#marshal_loadの使用
が推奨されます。 Marshal.dump するオ...
...ブジェクトが _dump と marshal_dump の両方の
メソッドを持つ場合は marshal_dump が優先されます。

メソッド _dump は引数として再帰を制限するレベル limit を受
け取り、オブジェクトを文字列化したものを返します。

インスタン...
...

@param limit 再帰の制限レベルを表す整数です。
@return オブジェクトを文字列化したものを返すように定義すべきです。

//emlist[][ruby]{
class Foo
def initialize(arg)
@foo = arg
end
def _dump(limit)
Marshal.dump(@foo, limit)
end
def self...

Object#marshal_dump -> object (9320.0)

Marshal.#dump を制御するメソッドです。

...Marshal.#dump を制御するメソッドです。

Marshal.dump(some) において、出力するオブジェクト some がメソッド marshal_dump
持つ場合には、その返り値がダンプされたものが Marshal.dump(some) の返り値となります。

marshal_dump/marshal_load...
...みは Ruby 1.8.0 から導入されました。
これから書くプログラムでは _dump/_load ではなく
marshal_dump/marshal_load を使うべきです。

@return 任意のオブジェクトで marshal_load の引数に利用できます。

//emlist[][ruby]{
class Foo
def initialize(ar...
...def marshal_dump
@foo
end
def marshal_load(obj)
p obj
@foo = obj
end
end
foo = Foo.new(['foo', 'bar'])
p foo #=> #<Foo:0xbaf3b0 @foo=["foo", "bar"]>
dms = Marshal.dump(foo)
p dms #=> "\004\bU:\bFoo[\a\"\bfoo\"\bbar"
result = Marshal.load...

String#undump -> String (9219.0)

self のエスケープを戻したものを返します。

...self のエスケープを戻したものを返します。

String#dump の逆変換にあたります。

//emlist[例][ruby]{
"\"hello \\n ''\"".undump #=> "hello \n ''"
//}

@see String#dump...

Encoding::InvalidByteSequenceError#error_bytes -> String (9119.0)

エラー発生時に捨てられたバイト列を返します。

...//emlist[例][ruby]{
ec = Encoding::Converter.new("EUC-JP", "ISO-8859-1")
begin
ec.convert("abc\xA1\xFFdef")
rescue Encoding::InvalidByteSequenceError
p $!
#=> #<Encoding::InvalidByteSequenceError: "\xA1" followed by "\xFF" on EUC-JP>
puts $!.error_bytes.dump #=> "\xA1"
puts $!.re...
...adagain_bytes.dump #=> "\xFF"
end
//}

@see Encoding::InvalidByteSequenceError#readagain_bytes...

絞り込み条件を変える

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

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

...g::Converter#primitive_convert が唯一の方法になります。

@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesize 変...
...ptions 変換の詳細を指定する定数やハッシュ
@return 変換結果を表す Symbol

options には以下が指定できます。

: hash form
:partial_input => true # source buffer may be part of larger source
:after_output => true # stop conversion after output...
...re input
: integer form
Encoding::Converter::PARTIAL_INPUT
Encoding::Converter::AFTER_OUTPUT

戻り値は以下のうちのどれかです。

* :invalid_byte_sequence
* :incomplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full
* :source_buffer_empty
* :...

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

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

...g::Converter#primitive_convert が唯一の方法になります。

@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesize 変...
...ptions 変換の詳細を指定する定数やハッシュ
@return 変換結果を表す Symbol

options には以下が指定できます。

: hash form
:partial_input => true # source buffer may be part of larger source
:after_output => true # stop conversion after output...
...re input
: integer form
Encoding::Converter::PARTIAL_INPUT
Encoding::Converter::AFTER_OUTPUT

戻り値は以下のうちのどれかです。

* :invalid_byte_sequence
* :incomplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full
* :source_buffer_empty
* :...

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

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

...g::Converter#primitive_convert が唯一の方法になります。

@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesize 変...
...ptions 変換の詳細を指定する定数やハッシュ
@return 変換結果を表す Symbol

options には以下が指定できます。

: hash form
:partial_input => true # source buffer may be part of larger source
:after_output => true # stop conversion after output...
...re input
: integer form
Encoding::Converter::PARTIAL_INPUT
Encoding::Converter::AFTER_OUTPUT

戻り値は以下のうちのどれかです。

* :invalid_byte_sequence
* :incomplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full
* :source_buffer_empty
* :...

Encoding::Converter#primitive_convert(source_buffer, destination_buffer) -> Symbol (6319.0)

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

...g::Converter#primitive_convert が唯一の方法になります。

@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesize 変...
...ptions 変換の詳細を指定する定数やハッシュ
@return 変換結果を表す Symbol

options には以下が指定できます。

: hash form
:partial_input => true # source buffer may be part of larger source
:after_output => true # stop conversion after output...
...re input
: integer form
Encoding::Converter::PARTIAL_INPUT
Encoding::Converter::AFTER_OUTPUT

戻り値は以下のうちのどれかです。

* :invalid_byte_sequence
* :incomplete_input
* :undefined_conversion
* :after_output
* :destination_buffer_full
* :source_buffer_empty
* :...
<< 1 2 3 > >>