772件ヒット
[1-100件を表示]
(0.029秒)
クラス
-
Encoding
:: Converter (72) -
Encoding
:: InvalidByteSequenceError (84) -
Net
:: IMAP (60) - Numeric (14)
-
Psych
:: Handler (36) -
Psych
:: Nodes :: Sequence (144) -
RubyVM
:: InstructionSequence (246) - TracePoint (7)
キーワード
- ANY (12)
- ASN1 (12)
- BLOCK (12)
- Document (12)
- FLOW (12)
- InstructionSequence (12)
- InvalidByteSequenceError (12)
- Mapping (12)
-
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 2
. 6 . 0 (7) -
NEWS for Ruby 2
. 7 . 0 (6) - Nodes (12)
-
absolute
_ path (12) - anchor (12)
- anchor= (12)
-
base
_ label (12) - compile (12)
-
compile
_ file (12) -
compile
_ option (12) -
compile
_ option= (12) - copy (12)
-
destination
_ encoding (12) -
destination
_ encoding _ name (12) - disasm (24)
- disassemble (24)
-
end
_ sequence (12) -
error
_ bytes (12) - eval (12)
-
first
_ lineno (12) - implicit (12)
- implicit= (12)
-
incomplete
_ input? (12) - inspect (12)
-
instruction
_ sequence (7) - label (12)
-
load
_ from _ binary (10) -
load
_ from _ binary _ extra _ data (10) - new (24)
- of (12)
- path (12)
-
primitive
_ convert (48) -
primitive
_ errinfo (12) - putback (12)
-
readagain
_ bytes (12) - search (12)
- sort (12)
-
source
_ encoding (12) -
source
_ encoding _ name (12) -
start
_ mapping (12) -
start
_ sequence (12) - step (14)
- style (12)
- style= (12)
- tag (12)
- tag= (12)
-
to
_ a (12) -
to
_ binary (10) -
uid
_ sort (12) -
uid
_ thread (12)
検索結果
先頭5件
-
Psych
:: Nodes :: Sequence (21086.0) -
YAML sequence http://yaml.org/spec/1.1/#sequence/syntax を表すクラスです。
...YAML sequence http://yaml.org/spec/1.1/#sequence/syntax を表すクラスです。
YAML sequence とは基本的にはリスト、配列です。以下のような例が考えられます。
%YAML 1.1
---
- I am
- a Sequence
YAML sequence には anchor を付加することができます......Psych::Nodes::Sequence#anchor は "A" を返します。
%YAML 1.1
---
&A [
"This sequence",
"has an anchor"
]
tag を付けることもできます。この例では
Psych::Nodes::Sequence#tag は "tag:yaml.org,2002:seq"
(!seq はこの tag の別名)を返します。
%YAML 1......"This sequence",
"has a tag"
]
Psych::Nodes::Sequence は 0 個以上の子ノードを持つことができます。
子ノードは以下のいずれかクラスのインスタンスでなければなりません。
* Psych::Nodes::Sequence
* Psych::Nodes::Mapping
* Psych::Nodes:... -
Encoding
:: InvalidByteSequenceError # error _ bytes -> String (12100.0) -
エラー発生時に捨てられたバイト列を返します。
...[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 $!.readagain_bytes.......dump #=> "\xFF"
end
//}
@see Encoding::InvalidByteSequenceError#readagain_bytes... -
Encoding
:: InvalidByteSequenceError # readagain _ bytes -> String (12100.0) -
エラー発生時に読み直さなければならないバイト列を返します。
...エラー発生時に読み直さなければならないバイト列を返します。
@see Encoding::InvalidByteSequenceError#error_bytes... -
Encoding
:: InvalidByteSequenceError (12000.0) -
文字列がそのエンコーディングにおいて不正なバイト列である場合に発生 する例外。
...である場合に発生
する例外。
通常エンコーディング変換時に発生します。
//emlist[例][ruby]{
"\x82\xa0".force_encoding("cp932").encode("UTF-8")
#=> "あ"
"\x82\xa0".force_encoding("EUC-JP").encode("UTF-8")
#=> Encoding::InvalidByteSequenceError: "\x82" on EUC-JP
//}... -
Psych
:: Handler # start _ sequence(anchor , tag , implicit , style) -> () (9271.0) -
sequence の開始を見付けたときに呼び出されます。
...
sequence の開始を見付けたときに呼び出されます。
anchor には sequence に関連付けられた anchor の名前が文字列で渡されます。
anchor がない場合には nil が渡されます。
tag には sequence に関連付けられた tag の名前が文字列で渡......ます。
implicit には sequence が implicit に開始されたかどうかが
真偽値で渡されます。
style には sequence の style が整数値で渡されます。以下のいずれか
です。
* Psych::Nodes::Sequence::BLOCK
* Psych::Nodes::Sequence::FLOW
必要に応じて......@param tag タグ名
@param implicit sequence が implicit に開始されかどうか
@param style sequence のスタイル
=== Example
以下の YAML ドキュメントを例として考えます。
---
- !!seq [
a
]
- &pewpew
- b
この YAML ドキュメントには3つの li... -
RubyVM
:: InstructionSequence . load _ from _ binary(binary) -> RubyVM :: InstructionSequence (9200.0) -
RubyVM::InstructionSequence#to_binaryにより作られたバイナリフォーマットの文字列からiseqのオブジェクトをロードします。
...RubyVM::InstructionSequence#to_binaryにより作られたバイナリフォーマットの文字列からiseqのオブジェクトをロードします。
このローダーは検証機構をもっておらず、壊れたり改変されたバイナリを読み込むと深刻な問題を引き起......りません。自分が変換したバイナリデータを使うべきです。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
binary = iseq.to_binary
RubyVM::InstructionSequence.load_from_binary(binary).eval # => 3
//}
@see RubyVM::InstructionSequence#to_binary... -
Psych
:: Nodes :: Sequence # style -> Integer (9128.0) -
sequence の style を返します。
...sequence の style を返します。
@see Psych::Nodes::Sequence#style=,
Psych::Nodes::Sequence.new... -
Psych
:: Nodes :: Sequence # style=(sty) (9128.0) -
sequence の style を設定します。
...sequence の style を設定します。
@param sty 設定する style
@see Psych::Nodes::Sequence#style,
Psych::Nodes::Sequence.new... -
Psych
:: Nodes :: Sequence :: ANY -> Integer (9118.0) -
「任意」のスタイルを意味します。
...「任意」のスタイルを意味します。
emitter が適当に style を決めます。
@see Psych::Nodes::Sequence.new,
Psych::Nodes::Sequence#style,
Psych::Handler#start_sequence...