234件ヒット
[1-100件を表示]
(0.037秒)
別のキーワード
種類
- インスタンスメソッド (132)
- 特異メソッド (49)
- 定数 (42)
- クラス (11)
クラス
-
Encoding
:: Converter (99) -
Encoding
:: UndefinedConversionError (55) - IO (11)
- Object (20)
- Rational (11)
キーワード
-
MAJOR
_ VERSION (11) -
MINOR
_ VERSION (11) -
RUBY
_ ENGINE _ VERSION (9) -
RUBY
_ VERSION (11) - UndefinedConversionError (11)
- convert (11)
-
destination
_ encoding (22) -
destination
_ encoding _ name (11) -
error
_ char (11) -
last
_ error (11) - new (22)
-
primitive
_ convert (44) -
search
_ convpath (11) -
source
_ encoding (11) -
source
_ encoding _ name (11) -
try
_ convert (11) -
verify
_ compaction _ references (5)
検索結果
先頭5件
-
IO
. try _ convert(obj) -> IO | nil (27247.0) -
obj を to_io メソッドによって IO オブジェクトに変換します。 変換できなかった場合は nil を返します。
...obj を to_io メソッドによって IO オブジェクトに変換します。
変換できなかった場合は nil を返します。
IO.try_convert(STDOUT) # => STDOUT
IO.try_convert("STDOUT") # => nil... -
GC
. verify _ compaction _ references(toward: nil , double _ heap: nil) -> Hash (12202.0) -
コンパクションの参照の一貫性を検証します。
コンパクションの参照の一貫性を検証します。
このメソッドは処理系依存 (CRuby 特有) です。
コンパクション中に移動されたオブジェクトは T_MOVED オブジェクトに置き換えられます。
コンパクション後には T_MOVED を参照するオブジェクトは存在するべきではありません。
この関数は全てのオブジェクトが移動する余地を確保するためにヒープを2倍にして、
全ての移動を確実にするためにヒープをコンパクションして、全ての参照を更新して、
それからフルGCを実行します。
もし T_MOVED への参照をもつオブジェクトがあれば、マークスタックにプッシュされて、
SEGV が起きるでしょ... -
Marshal
:: MAJOR _ VERSION -> Integer (12202.0) -
Marshal.#dump が出力するデータフォーマットのバージョン番号です。
...とき例外 TypeError を発生させます。
マイナーバージョンが古いだけのフォーマットは読み込み可能ですが、
$VERBOSE = true のときには警告メッセージが出力されます
マーシャルされたデータのバージョン番号は以下のように... -
Marshal
:: MINOR _ VERSION -> Integer (12202.0) -
Marshal.#dump が出力するデータフォーマットのバージョン番号です。
...とき例外 TypeError を発生させます。
マイナーバージョンが古いだけのフォーマットは読み込み可能ですが、
$VERBOSE = true のときには警告メッセージが出力されます
マーシャルされたデータのバージョン番号は以下のように... -
Object
:: RUBY _ ENGINE _ VERSION -> String (12202.0) -
Ruby処理系実装のバージョンを表す文字列。
Ruby処理系実装のバージョンを表す文字列。 -
Object
:: RUBY _ VERSION -> String (12202.0) -
Ruby のバージョンを表す文字列。
Ruby のバージョンを表す文字列。
Ruby のバージョンは、major.minor.teeny という形式です。 -
Encoding
:: UndefinedConversionError # destination _ encoding -> Encoding (12102.0) -
エラーを発生させた変換の変換先のエンコーディングを Encoding オブジェクトで返します。
...エラーを発生させた変換の変換先のエンコーディングを Encoding
オブジェクトで返します。
@see Encoding::UndefinedConversionError#source_encoding... -
Encoding
:: UndefinedConversionError # destination _ encoding _ name -> String (12102.0) -
エラーを発生させた変換の変換先のエンコーディングを文字列で返します。
...エラーを発生させた変換の変換先のエンコーディングを文字列で返します。
@see Encoding::UndefinedConversionError#destination_encoding... -
Encoding
:: UndefinedConversionError (12002.0) -
エンコーディング変換後の文字が存在しない場合に発生する例外。
...ing::UndefinedConversionError: U+2603 from UTF-8 to EUC-JP
//}
変換が多段階でなされ、その途中で例外が生じた場合は、
例外オブジェクトが保持するエラー情報はその中間のものになります。
//emlist[例][ruby]{
ec = Encoding::Converter.new("ISO-885......-JP")
# ISO-8859-1 -> UTF-8 -> EUC-JP
begin
ec.convert("\xa0")
# NO-BREAK SPACE, which is available in UTF-8 but not in EUC-JP.
rescue Encoding::UndefinedConversionError
p $!.source_encoding #=> #<Encoding:UTF-8>
p $!.destination_encoding #=> #<Encoding:EUC-JP>
p $!.so......urce_encoding_name #=> "UTF-8"
p $!.destination_encoding_name #=> "EUC-JP"
puts $!.error_char.dump #=> "\u{a0}"
p $!.error_char.encoding #=> #<Encoding:UTF-8>
end
//}... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize , options) -> Symbol (9502.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
...oding::Converter#primitive_convert が唯一の方法になります。
@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesize......aram options 変換の詳細を指定する定数やハッシュ
@return 変換結果を表す Symbol
options には以下が指定できます。
: hash form
:partial_input => true # source buffer may be part of larger source
:after_output => true # stop conversion after......efore 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...