688件ヒット
[1-100件を表示]
(0.132秒)
ライブラリ
- ビルトイン (450)
- json (12)
-
net
/ imap (130) - psych (84)
-
rdoc
/ context (12)
クラス
-
Encoding
:: Converter (96) -
Encoding
:: InvalidByteSequenceError (84) -
Enumerator
:: ArithmeticSequence (98) -
Net
:: IMAP (106) -
Net
:: IMAP :: FetchData (12) -
Net
:: IMAP :: ThreadMember (12) - Numeric (21)
-
Psych
:: Handler (36) -
Psych
:: Nodes :: Sequence (48) -
RDoc
:: Context :: Section (12) - Range (14)
-
RubyVM
:: InstructionSequence (130) - TracePoint (7)
モジュール
キーワード
- % (7)
- == (7)
-
absolute
_ path (12) - anchor (12)
- anchor= (12)
-
base
_ label (12) - begin (7)
- copy (12)
-
destination
_ encoding (12) -
destination
_ encoding _ name (12) - disasm (12)
- disassemble (12)
- each (14)
- end (7)
-
end
_ sequence (12) -
error
_ bytes (12) - eval (12)
-
exclude
_ end? (7) - expunge (12)
- fetch (12)
- first (14)
-
first
_ lineno (12) - hash (7)
-
incomplete
_ input? (12) - inspect (19)
-
instruction
_ sequence (7) - label (12)
- last (14)
-
last
_ error (12) - move (10)
- path (12)
-
primitive
_ convert (48) -
primitive
_ errinfo (12) - putback (24)
-
readagain
_ bytes (12) - search (12)
- seqno (24)
- size (7)
- sort (12)
-
source
_ encoding (12) -
source
_ encoding _ name (12) -
start
_ mapping (12) -
start
_ sequence (12) - step (35)
- store (12)
- style (12)
- tag (12)
-
to
_ a (12) -
to
_ binary (10) -
to
_ json _ raw _ object (12) -
uid
_ sort (12) -
uid
_ thread (12)
検索結果
先頭5件
-
RDoc
:: Context :: Section # sequence -> String (21202.0) -
section のシーケンス番号を文字列で返します。
section のシーケンス番号を文字列で返します。
リンクを作成する時に使われます。 -
TracePoint
# instruction _ sequence -> RubyVM :: InstructionSequence (12508.0) -
script_compiledイベント発生時にコンパイルされた RubyVM::InstructionSequenceインスタンスを返します。
...script_compiledイベント発生時にコンパイルされた
RubyVM::InstructionSequenceインスタンスを返します。
//emlist[例][ruby]{
TracePoint.new(:script_compiled) do |tp|
p tp.instruction_sequence # => <RubyVM::InstructionSequence:block in <main>@(eval):1>
end.enable do
eval......("puts 'hello'")
end
//}
@raise RuntimeError :script_compiled イベントのための
イベントフックの外側で実行した場合に発生します。... -
Psych
:: Handler # start _ sequence(anchor , tag , implicit , style) -> () (12272.0) -
sequence の開始を見付けたときに呼び出されます。
...
sequence の開始を見付けたときに呼び出されます。
anchor には sequence に関連付けられた anchor の名前が文字列で渡されます。
anchor がない場合には nil が渡されます。
tag には sequence に関連付けられた tag の名前が文字列で渡...... sequence が implicit に開始されたかどうかが
真偽値で渡されます。
style には sequence の style が整数値で渡されます。以下のいずれか
です。
* Psych::Nodes::Sequence::BLOCK
* Psych::Nodes::Sequence::FLOW
必要に応じてこのメソッドを overri......de してください。
@param anchor 関連付けられた anchor の名前
@param tag タグ名
@param implicit sequence が implicit に開始されかどうか
@param style sequence のスタイル
=== Example
以下の YAML ドキュメントを例として考えます。
---
- !!seq [... -
JSON
:: Generator :: GeneratorMethods :: String # to _ json _ raw _ object -> Hash (12107.0) -
生の文字列を格納したハッシュを生成します。
...する場合に使用してください。
require 'json'
"にほんご".encode("euc-jp").to_json_raw_object
# => {"json_class"=>"String", "raw"=>[164, 203, 164, 219, 164, 243, 164, 180]}
"にほんご".encode("euc-jp").to_json # source sequence is illegal/malformed (JSON::GeneratorError)... -
Encoding
:: InvalidByteSequenceError # error _ bytes -> String (12101.0) -
エラー発生時に捨てられたバイト列を返します。
...st[例][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 $!.readagai......n_bytes.dump #=> "\xFF"
end
//}
@see Encoding::InvalidByteSequenceError#readagain_bytes... -
RubyVM
:: InstructionSequence # first _ lineno -> Integer (12101.0) -
self が表す命令シーケンスの 1 行目の行番号を返します。
...の 1 行目の行番号を返します。
例1:irb で実行した場合
RubyVM::InstructionSequence.compile('num = 1 + 2').first_lineno
# => 1
例2:
# /tmp/method.rb
require "foo-library"
def foo
p :foo
end
RubyVM::InstructionSequence.of(method(:foo)).first_lineno
# => 2... -
RubyVM
:: InstructionSequence # to _ binary(extra _ data = nil) -> String (12101.0) -
バイナリフォーマットでシリアライズされたiseqのデータを文字列として返します。 RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。
...て返します。
RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。
引数の extra_data はバイナリデータと共に保存されます。
RubyVM::InstructionSequence.load_from_binary_extra_data メソッ......ry で得たバイナリデータは他のマシンに移動できません。他のバージョンや他のアーキテクチャのRubyで作られたバイナリデータは使用できません。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
iseq.to_binary("extr......合上改行しているが実際は改行はない
# => "YARB\x02\x00\x00\x00\x03\x00\x00\x00\x16\x02\x00\x00\n\x00\x00\x00\x01
# \x00\x00\x00\x03\x00\x00\x00\x05\x00\x00\x00\x84\x01\x00\x00\x88\x01\x00
# \x00\x02\x02\x00\x00x86_64-darwin15\x00*\x00\x00\x00\x00\x00\x00\x00\x01
# \x00\x00\x00\x00\x0... -
Encoding
:: Converter # primitive _ errinfo -> Array (9225.0) -
直前の Encoding::Converter#primitive_convert による変換の結果を保持する五要素の配列を返します。
...erter#primitive_convert による変換の結果を保持する五要素の配列を返します。
@return [result, enc1, enc2, error_bytes, readagain_bytes] という五要素の配列
result は直前の primitive_convert の戻り値です。
それ以外の四要素は :invalid_byte_sequence......t か :undefined_conversion だった場合に意味を持ちます。
enc1 はエラーの発生した原始変換の変換元のエンコーディング、enc2 は変換先のエンコーディングです。
error_bytes はエラーの発生原因となったバイト列、readagain_bytes は先......ト列です。
primitive_errinfo はもっぱら Encoding::Converter#primitive_convert と組み合わせて使います。Encoding::Converter#convert を用いている場合にも取得することはできますが、有用な使い方は難しいでしょう。
//emlist[][ruby]{
# \xff is inv... -
Psych
:: Nodes :: Sequence # anchor -> String|nil (9129.0) -
sequence に付加された anchor を返します。
...sequence に付加された anchor を返します。
@see Psych::Nodes::Sequence#anchor=,
Psych::Nodes::Sequence.new...