クラス
キーワード
- ANY (1)
- ASN1 (1)
- BLOCK (1)
- Document (1)
- FLOW (1)
- InstructionSequence (1)
- InvalidByteSequenceError (1)
- Mapping (1)
-
NEWS for Ruby 2
. 0 . 0 (1) - Nodes (1)
-
absolute
_ path (1) - anchor (1)
- anchor= (1)
-
base
_ label (1) - compile (1)
-
compile
_ file (1) -
compile
_ option (1) -
compile
_ option= (1) - copy (1)
-
destination
_ encoding (1) -
destination
_ encoding _ name (1) - disasm (2)
- disassemble (2)
-
end
_ sequence (1) -
error
_ bytes (1) - eval (1)
-
first
_ lineno (1) - implicit (1)
- implicit= (1)
-
incomplete
_ input? (1) - inspect (1)
- label (1)
-
load
_ from _ binary (1) -
load
_ from _ binary _ extra _ data (1) - new (2)
- of (1)
- path (1)
-
primitive
_ convert (4) -
primitive
_ errinfo (1) - putback (1)
-
readagain
_ bytes (1) - search (1)
- sort (1)
-
source
_ encoding (1) -
source
_ encoding _ name (1) -
start
_ mapping (1) -
start
_ sequence (1) - style (1)
- style= (1)
- tag (1)
- tag= (1)
-
to
_ a (1) -
to
_ binary (1) -
uid
_ sort (1) -
uid
_ thread (1)
検索結果
先頭5件
-
Psych
:: Nodes :: Sequence (63259.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... -
Encoding
:: InvalidByteSequenceError # error _ bytes -> String (36301.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 ... -
Encoding
:: InvalidByteSequenceError # readagain _ bytes -> String (36301.0) -
エラー発生時に読み直さなければならないバイト列を返します。
エラー発生時に読み直さなければならないバイト列を返します。
@see Encoding::InvalidByteSequenceError#error_bytes -
Encoding
:: InvalidByteSequenceError (36001.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) -> () (27814.0) -
sequence の開始を見付けたときに呼び出されます。
sequence の開始を見付けたときに呼び出されます。
anchor には sequence に関連付けられた anchor の名前が文字列で渡されます。
anchor がない場合には nil が渡されます。
tag には sequence に関連付けられた tag の名前が文字列で渡されます。
tag がない場合には nil が渡されます。
implicit には sequence が implicit に開始されたかどうかが
真偽値で渡されます。
style には sequence の style が整数値で渡されます。以下のいずれか
です。
* Psych::Nodes:... -
RubyVM
:: InstructionSequence . load _ from _ binary(binary) -> RubyVM :: InstructionSequence (27601.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:... -
Psych
:: Nodes :: Sequence # style -> Integer (27385.0) -
sequence の style を返します。
sequence の style を返します。
@see Psych::Nodes::Sequence#style=,
Psych::Nodes::Sequence.new -
Psych
:: Nodes :: Sequence # style=(sty) (27385.0) -
sequence の style を設定します。
sequence の style を設定します。
@param sty 設定する style
@see Psych::Nodes::Sequence#style,
Psych::Nodes::Sequence.new -
Psych
:: Nodes :: Sequence :: ANY -> Integer (27355.0) -
「任意」のスタイルを意味します。
「任意」のスタイルを意味します。
emitter が適当に style を決めます。
@see Psych::Nodes::Sequence.new,
Psych::Nodes::Sequence#style,
Psych::Handler#start_sequence -
Psych
:: Handler # end _ sequence -> () (27352.0) -
sequence の終了の見付けたときに呼び出されます。
sequence の終了の見付けたときに呼び出されます。
必要に応じてこのメソッドを override してください。 -
RubyVM
:: InstructionSequence # to _ binary(extra _ data = nil) -> String (27319.0) -
バイナリフォーマットでシリアライズされたiseqのデータを文字列として返します。 RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。
バイナリフォーマットでシリアライズされたiseqのデータを文字列として返します。
RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。
引数の extra_data はバイナリデータと共に保存されます。
RubyVM::InstructionSequence.load_from_binary_extra_data メソッドでこの文字列にアクセス出来ます。
注意: 変換後のバイナリデータはポータブルではありません。 to_binary で得たバイナリデータは他のマシンに移動できません。他... -
RubyVM
:: InstructionSequence . load _ from _ binary _ extra _ data(binary) -> String (27301.0) -
バイナリフォーマットの文字列から埋め込まれたextra_dataを取り出します。
バイナリフォーマットの文字列から埋め込まれたextra_dataを取り出します。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
binary = iseq.to_binary("extra_data")
RubyVM::InstructionSequence.load_from_binary_extra_data(binary) # => extra_data
//}
@see RubyVM::InstructionSequence#to_binary -
RubyVM
:: InstructionSequence (27001.0) -
Ruby の Virtual Machine のコンパイル済みの命令シーケンスを表すクラスです。
Ruby の Virtual Machine のコンパイル済みの命令シーケンスを表すクラスです。
Method、Proc オブジェクトや Ruby のソースコードを表す文字列
から VM の命令シーケンスを得る事ができます。また、
RubyVM::InstructionSequence オブジェクトを元に命令シーケンスを読みやす
い文字列に変換する事もできます。Ruby の命令シーケンスコンパイラの設定を
扱う必要がありますが、Ruby の VM がどのように働くかを知るのに有用です。
VM の命令シーケンスの一覧はRuby のソースコード中の insns.def から参照で
きます。
... -
Psych
:: Nodes :: Sequence . new(anchor=nil , tag=nil , implicit=true , style=BLOCK) -> Psych :: Nodes :: Sequence (18814.0) -
新たな sequence オブジェクトを生成します。
新たな sequence オブジェクトを生成します。
anchor には sequence に付加されている anchor を文字列で指定します。
anchor を付けない場合には nil を指定します。
tag には sequence に付加されている tag を文字列で指定します。
tag を付けない場合には nil を指定します。
implicit には sequence が implicit に開始されたかどうかを
真偽値で指定します。
style には YAML ドキュメント上の style を整数で指定します。以下のいずれ
かを指定できます。
* Psych::Nod... -
RubyVM
:: InstructionSequence . compile(source , file = nil , path = nil , line = 1 , options = nil) -> RubyVM :: InstructionSequence (18601.0) -
引数 source で指定した Ruby のソースコードを元にコンパイル済みの RubyVM::InstructionSequence オブジェクトを作成して返します。
引数 source で指定した Ruby のソースコードを元にコンパイル済みの
RubyVM::InstructionSequence オブジェクトを作成して返します。
@param source Ruby のソースコードを文字列で指定します。
@param file ファイル名を文字列で指定します。
@param path 引数 file の絶対パスファイル名を文字列で指定します。
@param line 引数 source の 1 行目の行番号を指定します。
@param options コンパイル時のオプションを true、false、Hash オブ
... -
RubyVM
:: InstructionSequence . compile _ file(file , options = nil) -> RubyVM :: InstructionSequence (18601.0) -
引数 file で指定した Ruby のソースコードを元にコンパイル済みの RubyVM::InstructionSequence オブジェクトを作成して返します。
引数 file で指定した Ruby のソースコードを元にコンパイル済みの
RubyVM::InstructionSequence オブジェクトを作成して返します。
RubyVM::InstructionSequence.compile とは異なり、file、path などの
メタデータは自動的に取得します。
@param file ファイル名を文字列で指定します。
@param options コンパイル時のオプションを true、false、Hash オブ
ジェクトのいずれかで指定します。詳細は
RubyVM::Instr... -
RubyVM
:: InstructionSequence . new(source , file = nil , path = nil , line = 1 , options = nil) -> RubyVM :: InstructionSequence (18601.0) -
引数 source で指定した Ruby のソースコードを元にコンパイル済みの RubyVM::InstructionSequence オブジェクトを作成して返します。
引数 source で指定した Ruby のソースコードを元にコンパイル済みの
RubyVM::InstructionSequence オブジェクトを作成して返します。
@param source Ruby のソースコードを文字列で指定します。
@param file ファイル名を文字列で指定します。
@param path 引数 file の絶対パスファイル名を文字列で指定します。
@param line 引数 source の 1 行目の行番号を指定します。
@param options コンパイル時のオプションを true、false、Hash オブ
... -
RubyVM
:: InstructionSequence . of(body) -> RubyVM :: InstructionSequence (18601.0) -
引数 body で指定した Proc、Method オブジェクトを元に RubyVM::InstructionSequence オブジェクトを作成して返します。
引数 body で指定した Proc、Method オブジェクトを元に
RubyVM::InstructionSequence オブジェクトを作成して返します。
@param body Proc、Method オブジェクトを指定します。
例1:irb で実行した場合
# proc
> p = proc { num = 1 + 2 }
> RubyVM::InstructionSequence.of(p)
> # => <RubyVM::InstructionSequence:block in irb_binding@(irb)>
# method
> def ... -
Net
:: IMAP # copy(set , mailbox) -> Net :: IMAP :: TaggedResponse (18355.0) -
COPY コマンドを送り、指定したメッセージを 指定したメールボックスの末尾に追加します。
COPY コマンドを送り、指定したメッセージを
指定したメールボックスの末尾に追加します。
set でコピーするメッセージを指定します。
message sequence number(整数)、
message sequence numberの配列、もしくは Range で
指定します。コピー元のメールボックスは
Net::IMAP#examine もしくは Net::IMAP#select で
指定したものを用います。
mailbox はコピー先のメールボックスです。
@param set コピーするメッセージの message sequence number
@param mailbo... -
RubyVM
:: InstructionSequence # to _ a -> Array (18301.0) -
self の情報を 14 要素の配列にして返します。
...ンドの配列の配列。
//emlist[例][ruby]{
require 'pp'
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
pp iseq.to_a
# ※ Ruby 2.5.0 での実行結果
# => ["YARVInstructionSequence/SimpleDataFormat",
# 2,
# 0,
# 1,
# {:arg_size=>0, :local_size=>2, :stack_max=>2},
# "<compiled>"... -
RubyVM
:: InstructionSequence . disasm(body) -> String (18301.0) -
引数 body で指定したオブジェクトから作成した RubyVM::InstructionSequence オブジェクトを人間が読める形式の文字 列に変換して返します。
引数 body で指定したオブジェクトから作成した
RubyVM::InstructionSequence オブジェクトを人間が読める形式の文字
列に変換して返します。
@param body Proc、Method オブジェクトを指定します。
例1:Proc オブジェクトを指定した場合
# /tmp/proc.rb
p = proc { num = 1 + 2 }
puts RubyVM::InstructionSequence.disasm(p)
出力:
== disasm: <RubyVM::InstructionSequence:block in <main... -
RubyVM
:: InstructionSequence . disassemble(body) -> String (18301.0) -
引数 body で指定したオブジェクトから作成した RubyVM::InstructionSequence オブジェクトを人間が読める形式の文字 列に変換して返します。
引数 body で指定したオブジェクトから作成した
RubyVM::InstructionSequence オブジェクトを人間が読める形式の文字
列に変換して返します。
@param body Proc、Method オブジェクトを指定します。
例1:Proc オブジェクトを指定した場合
# /tmp/proc.rb
p = proc { num = 1 + 2 }
puts RubyVM::InstructionSequence.disasm(p)
出力:
== disasm: <RubyVM::InstructionSequence:block in <main... -
Psych
:: Nodes :: Sequence # anchor -> String|nil (18085.0) -
sequence に付加された anchor を返します。
sequence に付加された anchor を返します。
@see Psych::Nodes::Sequence#anchor=,
Psych::Nodes::Sequence.new -
Psych
:: Nodes :: Sequence # anchor=(a) (18085.0) -
sequence に付加する anchor を設定します。
sequence に付加する anchor を設定します。
@param a 設定する anchor
@see Psych::Nodes::Sequence#anchor,
Psych::Nodes::Sequence.new -
Psych
:: Nodes :: Sequence # implicit -> bool (18085.0) -
sequence が implicit に開始されたかどうかを真偽値で返します。
sequence が implicit に開始されたかどうかを真偽値で返します。
@see Psych::Nodes::Sequence#implicit=,
Psych::Nodes::Sequence.new -
Psych
:: Nodes :: Sequence # implicit=(bool) (18085.0) -
sequence が implicit に開始されたかどうかを真偽値で設定します。
sequence が implicit に開始されたかどうかを真偽値で設定します。
@param bool 設定値
@see Psych::Nodes::Sequence#implicit,
Psych::Nodes::Sequence.new -
Psych
:: Nodes :: Sequence # tag -> String|nil (18085.0) -
sequence に付加された tag を返します。
sequence に付加された tag を返します。
@see Psych::Nodes::Sequence#tag=,
Psych::Nodes::Sequence.new -
Psych
:: Nodes :: Sequence # tag=(t) (18085.0) -
sequence に付加する tag を設定します。
sequence に付加する tag を設定します。
@param t 設定する tag
@see Psych::Nodes::Sequence#anchor=,
Psych::Nodes::Sequence.new -
Psych
:: Nodes :: Sequence :: BLOCK -> Integer (18055.0) -
block style を表します。
block style を表します。
@see Psych::Nodes::Sequence.new,
Psych::Nodes::Sequence#style,
Psych::Handler#start_sequence -
Psych
:: Nodes :: Sequence :: FLOW -> Integer (18037.0) -
flow style を表します。
flow style を表します。
@see Psych::Nodes::Sequence.new,
Psych::Nodes::Sequence#style -
Encoding
:: InvalidByteSequenceError # destination _ encoding -> Encoding (18001.0) -
エラーを発生させた変換の変換先のエンコーディングを Encoding オブジェクトで返します。
エラーを発生させた変換の変換先のエンコーディングを Encoding
オブジェクトで返します。
@see Encoding::InvalidByteSequenceError#source_encoding,
Encoding::UndefinedConversionError#destination_encoding -
Encoding
:: InvalidByteSequenceError # destination _ encoding _ name -> String (18001.0) -
エラーを発生させた変換の変換先のエンコーディングを文字列で返します。
エラーを発生させた変換の変換先のエンコーディングを文字列で返します。
@see Encoding::InvalidByteSequenceError#destination_encoding -
Encoding
:: InvalidByteSequenceError # incomplete _ input? -> bool (18001.0) -
エラー発生時に入力文字列が不足している場合に真を返します。
エラー発生時に入力文字列が不足している場合に真を返します。
つまり、マルチバイト文字列の途中で文字列が終わっている場合に
真を返します。これは後続の入力を追加することでエラーが
解消する可能性があることを意味します。
//emlist[例][ruby]{
ec = Encoding::Converter.new("EUC-JP", "ISO-8859-1")
begin
ec.convert("abc\xA1z")
rescue Encoding::InvalidByteSequenceError
p $!
#=> #<Encoding::InvalidByteSequenc... -
Encoding
:: InvalidByteSequenceError # source _ encoding -> Encoding (18001.0) -
エラーを発生させた変換の変換元のエンコーディングを Encoding オブジェクトで返します。
エラーを発生させた変換の変換元のエンコーディングを Encoding
オブジェクトで返します。
@see Encoding::InvalidByteSequenceError#destination_encoding,
Encoding::UndefinedConversionError#source_encoding -
Encoding
:: InvalidByteSequenceError # source _ encoding _ name -> Encoding (18001.0) -
エラーを発生させた変換の変換元のエンコーディングを文字列で返します。
エラーを発生させた変換の変換元のエンコーディングを文字列で返します。
@see Encoding::InvalidByteSequenceError#source_encoding -
RubyVM
:: InstructionSequence # absolute _ path -> String | nil (18001.0) -
self が表す命令シーケンスの絶対パスを返します。
self が表す命令シーケンスの絶対パスを返します。
self を文字列から作成していた場合は nil を返します。
例1:irb で実行した場合
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.absolute_path
# => nil
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/method.... -
RubyVM
:: InstructionSequence # base _ label -> String (18001.0) -
self が表す命令シーケンスの基本ラベルを返します。
self が表す命令シーケンスの基本ラベルを返します。
例1:irb で実行した場合
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.base_label
# => "<compiled>"
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/method.rb
def hello
puts "h... -
RubyVM
:: InstructionSequence # disasm -> String (18001.0) -
self が表す命令シーケンスを人間が読める形式の文字列に変換して返します。
self が表す命令シーケンスを人間が読める形式の文字列に変換して返します。
puts RubyVM::InstructionSequence.compile('1 + 2').disasm
出力:
== disasm: <RubyVM::InstructionSequence:<compiled>@<compiled>>==========
0000 trace 1 ( 1)
0002 putobject 1
0004 putobje... -
RubyVM
:: InstructionSequence # disassemble -> String (18001.0) -
self が表す命令シーケンスを人間が読める形式の文字列に変換して返します。
self が表す命令シーケンスを人間が読める形式の文字列に変換して返します。
puts RubyVM::InstructionSequence.compile('1 + 2').disasm
出力:
== disasm: <RubyVM::InstructionSequence:<compiled>@<compiled>>==========
0000 trace 1 ( 1)
0002 putobject 1
0004 putobje... -
RubyVM
:: InstructionSequence # eval -> object (18001.0) -
self の命令シーケンスを評価してその結果を返します。
self の命令シーケンスを評価してその結果を返します。
RubyVM::InstructionSequence.compile("1 + 2").eval # => 3 -
RubyVM
:: InstructionSequence # first _ lineno -> Integer (18001.0) -
self が表す命令シーケンスの 1 行目の行番号を返します。
self が表す命令シーケンスの 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 # inspect -> String (18001.0) -
self の情報をラベルとパスを含んだ人間に読みやすい文字列にして返します。
self の情報をラベルとパスを含んだ人間に読みやすい文字列にして返します。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
iseq.inspect # => "<RubyVM::InstructionSequence:<compiled>@<compiled>>"
//}
@see RubyVM::InstructionSequence#label,
RubyVM::InstructionSequence#path -
RubyVM
:: InstructionSequence # label -> String (18001.0) -
self が表す命令シーケンスのラベルを返します。通常、メソッド名、クラス名、 モジュール名などで構成されます。
self が表す命令シーケンスのラベルを返します。通常、メソッド名、クラス名、
モジュール名などで構成されます。
トップレベルでは "<main>" を返します。self を文字列から作成していた場合
は "<compiled>" を返します。
例1:irb で実行した場合
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.label
# => "<compiled>"
例2: R... -
RubyVM
:: InstructionSequence # path -> String (18001.0) -
self が表す命令シーケンスの相対パスを返します。
self が表す命令シーケンスの相対パスを返します。
self の作成時に指定した文字列を返します。self を文字列から作成していた
場合は "<compiled>" を返します。
例1:irb で実行した場合
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.path
# => "<compiled>"
例2: RubyVM::InstructionSequence.compi... -
RubyVM
:: InstructionSequence . compile _ option -> Hash (18001.0) -
命令シーケンスのコンパイル時のデフォルトの最適化オプションを Hash で返 します。
命令シーケンスのコンパイル時のデフォルトの最適化オプションを Hash で返
します。
//emlist[例][ruby]{
require "pp"
pp RubyVM::InstructionSequence.compile_option
# => {:inline_const_cache=>true,
# :peephole_optimization=>true,
# :tailcall_optimization=>false,
# :specialized_instruction=>true,
# :operands_unification=>true,
# :instructi... -
RubyVM
:: InstructionSequence . compile _ option=(options) (18001.0) -
命令シーケンスのコンパイル時のデフォルトの最適化オプションを引数 options で指定します。
命令シーケンスのコンパイル時のデフォルトの最適化オプションを引数
options で指定します。
@param options コンパイル時の最適化オプションを true、false、nil、
Hash のいずれかで指定します。true を指定した場合は
全てのオプションを有効にします。false を指定した場合は全
てのオプションを無効にします。nil を指定した場合はいずれ
のオプションも変更しません。また、Hash を指定した
場合は以... -
Psych
:: Handler # start _ mapping(anchor , tag , implicit , style) -> () (9319.0) -
mapping の開始を見付けたときに呼び出されます。
mapping の開始を見付けたときに呼び出されます。
anchor には map に関連付けられた anchor の名前が文字列で渡されます。
anchor がない場合には nil が渡されます。
tag には map に関連付けられた tag の名前が文字列で渡されます。
tag がない場合には nil が渡されます。
implicit には map が implicit に開始されたかどうかが
真偽値で渡されます。
style には sequence の style が整数値で渡されます。以下のいずれか
です。
* Psych::Nodes::Mapping::BLOCK
... -
Psych
:: Nodes (9091.0) -
Psych が中間データとして利用している AST (Abstract Syntax Tree) に 関するモジュール。
Psych が中間データとして利用している AST (Abstract Syntax Tree) に
関するモジュール。
Psych.load によって YAML ドキュメントを Ruby オブジェクトに変換
するときには、一度中間的な AST に変換され、その AST が Ruby の
オブジェクトに変換されます。
逆向き、つまり Psych.dump で Ruby のオブジェクトを
YAML ドキュメントに変換するときには、中間的な AST に変換してから
それを YAML ドキュメントに変換します。
YAML AST の各ノードのクラスはすべて Psych::Nodes の下にあり... -
Psych
:: Nodes :: Mapping (9055.0) -
YAML の mapping http://yaml.org/spec/1.1/#mapping を表すクラスです。
YAML の mapping http://yaml.org/spec/1.1/#mapping を表すクラスです。
Psych::Nodes::Mapping は 0 個以上の子ノードを持つことができます。
子ノードの個数は偶数でなければなりません。
子ノードは以下のいずれかクラスのインスタンスでなければなりません。
* Psych::Nodes::Sequence
* Psych::Nodes::Mapping
* Psych::Nodes::Scalar
* Psych::Nodes::Alias
子ノードは mapping のキーと値が交互に並んでいます。
as... -
NEWS for Ruby 2
. 0 . 0 (9037.0) -
NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
NEWS for Ruby 2.0.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリストは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。
== 1.9.3 以降の変更
=== 言語仕様の変更
* キーワード引数を追加しました
* %i, %I をシンボルの配列作成のために追加しました。(%w, %W に似ています)
* デフォルトのソースエンコーディングを US-ASCI... -
Psych
:: Nodes :: Document (9019.0) -
YAML ドキュメントを表すクラスです。
YAML ドキュメントを表すクラスです。
このノードは Psych::Nodes::Stream の子ノードでなければ
なりません。このノードは1個の子ノードを持たなければなりません。
またこの子ノードは以下のいずれかである必要があります。
* Psych::Nodes::Sequence
* Psych::Nodes::Mapping
* Psych::Nodes::Scalar
この唯一の子ノードは「ルート」とも呼ばれ、Psych::Nodes::Document#root で
アクセスすることができます。 -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize) -> Symbol (637.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
可搬性を確保しつつ、不正なバイトや変換先で未定義な文字の扱いを細かに指定したいときは、Encoding::Converter#primitive_convert が唯一の方法になります。
@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesize 変換先バッファの容量
@... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset , destination _ bytesize , options) -> Symbol (637.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
可搬性を確保しつつ、不正なバイトや変換先で未定義な文字の扱いを細かに指定したいときは、Encoding::Converter#primitive_convert が唯一の方法になります。
@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesize 変換先バッファの容量
@... -
Net
:: IMAP # sort(sort _ keys , search _ keys , charset) -> [Integer] (619.0) -
SORT コマンド送り、メールボックス内の メッセージをソートした結果を返します。
SORT コマンド送り、メールボックス内の
メッセージをソートした結果を返します。
SORT コマンドは 5256 で定義されています。
詳しくはそちらを参照してください。
このコマンドは Net::IMAP#capability の返り値を見ることで
利用可能かどうか判断できます。
sort_keys にはソート順を決めるキーを文字列の配列で指定します。
"ARRIVAL", "CC", "FROM", "TO", "SUBJECT" などが指定できます。
詳しくは 5265 の BASE.6.4.SORT の所を見てください。
search_key には検索条件を渡します。Net::... -
Net
:: IMAP # uid _ sort(sort _ keys , search _ keys , charset) -> [Integer] (619.0) -
SORT コマンド送り、メールボックス内の メッセージをソートした結果を返します。
SORT コマンド送り、メールボックス内の
メッセージをソートした結果を返します。
SORT コマンドは 5256 で定義されています。
詳しくはそちらを参照してください。
このコマンドは Net::IMAP#capability の返り値を見ることで
利用可能かどうか判断できます。
sort_keys にはソート順を決めるキーを文字列の配列で指定します。
"ARRIVAL", "CC", "FROM", "TO", "SUBJECT" などが指定できます。
詳しくは 5265 の BASE.6.4.SORT の所を見てください。
search_key には検索条件を渡します。Net::... -
Encoding
:: Converter # primitive _ errinfo -> Array (373.0) -
直前の Encoding::Converter#primitive_convert による変換の結果を保持する五要素の配列を返します。
直前の Encoding::Converter#primitive_convert による変換の結果を保持する五要素の配列を返します。
@return [result, enc1, enc2, error_bytes, readagain_bytes] という五要素の配列
result は直前の primitive_convert の戻り値です。
それ以外の四要素は :invalid_byte_sequence か :incomplete_input か :undefined_conversion だった場合に意味を持ちます。
enc1 はエラーの発生した原始変換の変換元のエンコーディング... -
Net
:: IMAP # search(keys , charset = nil) -> [Integer] (349.0) -
SEARCH コマンドを送り、条件に合うメッセージの message sequence number を配列で返します。
SEARCH コマンドを送り、条件に合うメッセージの message sequence number
を配列で返します。
Net::IMAP#examine もしくは Net::IMAP#select で
指定したメールボックスを検索対象とします。
検索の条件は key に文字列の1次元配列もしくは文字列で渡します。
検索条件は "SUBJECT", "FROM" などを用いることができます。
詳しくは 2060 の 6.4.4 を見てください。
例:
p imap.search(["SUBJECT", "hello"])
#=> [1, 6, 7, 8]
p imap.s... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer) -> Symbol (337.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
可搬性を確保しつつ、不正なバイトや変換先で未定義な文字の扱いを細かに指定したいときは、Encoding::Converter#primitive_convert が唯一の方法になります。
@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesize 変換先バッファの容量
@... -
Encoding
:: Converter # primitive _ convert(source _ buffer , destination _ buffer , destination _ byteoffset) -> Symbol (337.0) -
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
エンコーディング変換のためのメソッドの中で、もっとも細かな扱いが可能なメソッドです。
可搬性を確保しつつ、不正なバイトや変換先で未定義な文字の扱いを細かに指定したいときは、Encoding::Converter#primitive_convert が唯一の方法になります。
@param source_buffer 変換元文字列のバッファ
@param destination_buffer 変換先文字列を格納するバッファ
@param destination_byteoffset 変換先バッファでのオフセット
@param destination_bytesize 変換先バッファの容量
@... -
Encoding
:: Converter # putback(max _ numbytes) -> String (337.0) -
後の変換用に変換器内部で保持しているバイト列を max_numbytes で指定した バイト数だけ返します。max_numbytes を指定しなかった場合は保持しているバ イト列の全てを返します。
後の変換用に変換器内部で保持しているバイト列を max_numbytes で指定した
バイト数だけ返します。max_numbytes を指定しなかった場合は保持しているバ
イト列の全てを返します。
@param max_numbytes 取得するバイト列の最大値
@return 格納されていたバイト列
//emlist[][ruby]{
ec = Encoding::Converter.new("utf-16le", "iso-8859-1")
src = "\x00\xd8\x61\x00"
dst = ""
p ec.primitive_convert(src, dst) #=>... -
Net
:: IMAP # uid _ thread(algorithm , search _ keys , charset) -> [Net :: IMAP :: ThreadMember] (319.0) -
THREADコマンドを送り、メールボックスを検索した結果を スレッド形式の木構造で返します。
THREADコマンドを送り、メールボックスを検索した結果を
スレッド形式の木構造で返します。
ほぼ Net::IMAP#thread と同じですが、返ってくるオブジェクトの
Net::IMAP::ThreadMember#seqno の内容が message sequence number
ではなく UID となります。
@param algorithm スレッド構造構築アルゴリズム名(文字列)
@param search_key 検索条件(文字列配列)
@param charset 検索条件の解釈に用いるCHARSET名(文字列)
@see Net::IMAP::ThreadMember... -
OpenSSL
:: ASN1 (109.0) -
ASN.1(Abstract Syntax Notation One) のデータを取り扱うためのモジュールです。
ASN.1(Abstract Syntax Notation One)
のデータを取り扱うためのモジュールです。
OpenSSLで証明書などを取り扱うのに必要になります。
このモジュールには、ASN.1関連のモジュール関数や定数、
ASN.1 のデータ型に対応するクラスが定義されています。
このモジュールは ASN.1 を十分に取り扱うのに必要な機能は
持っていません。SSL/TLSで必要な機能しか実装されていません。
ASN.1 は ITU-T と ISO によって定義された、データの構造を定義するための
言語を中心とした規格です。
この言語で定義された抽象的な構造を実際のバイト列で...