ライブラリ
- ビルトイン (450)
- json (12)
-
net
/ imap (130) - psych (132)
-
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 (96) -
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)
- implicit (12)
- implicit= (12)
-
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)
- style= (12)
- tag (12)
- tag= (12)
-
to
_ a (12) -
to
_ binary (10) -
to
_ json _ raw _ object (12) -
uid
_ sort (12) -
uid
_ thread (12)
検索結果
先頭5件
-
RubyVM
:: InstructionSequence # inspect -> String (3001.0) -
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 (3001.0) -
self が表す命令シーケンスのラベルを返します。通常、メソッド名、クラス名、 モジュール名などで構成されます。
...ます。
例1:irb で実行した場合
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.label
# => "<compiled>"
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/method.rb
def hello......end
# irb
> iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.label # => "<main>"
例3:
# /tmp/method2.rb
def hello
puts "hello, world"
end
RubyVM::InstructionSequence.of(method(:hello)).label
# => "hello"
@see RubyVM::InstructionSequence#base_label... -
RubyVM
:: InstructionSequence # path -> String (3001.0) -
self が表す命令シーケンスの相対パスを返します。
...ます。
例1:irb で実行した場合
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.path
# => "<compiled>"
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/method.rb
def hello......puts "hello, world"
end
# irb
> iseq = RubyVM::InstructionSequence.compile_file('method.rb')
> iseq.path # => "method.rb"
@see RubyVM::InstructionSequence#absolute_path... -
RubyVM
:: InstructionSequence # to _ a -> Array (3001.0) -
self の情報を 14 要素の配列にして返します。
...命令シーケンスを以下の情報で表します。
: magic
データフォーマットを示す文字列。常に
"YARVInstructionSequence/SimpleDataFormat"。
: major_version
命令シーケンスのメジャーバージョン。
: minor_version
命令シーケンスのマイ......ランドの配列の配列。
//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},
# "<compile... -
RubyVM
:: InstructionSequence # to _ binary(extra _ data = nil) -> String (3001.0) -
バイナリフォーマットでシリアライズされたiseqのデータを文字列として返します。 RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。
...て返します。
RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。
引数の extra_data はバイナリデータと共に保存されます。
RubyVM::InstructionSequence.load_from_binary_extra_data メソッ......他のアーキテクチャのRubyで作られたバイナリデータは使用できません。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
iseq.to_binary("extra_data")
# ※表示の都合上改行しているが実際は改行はない
# => "YARB\x02\x00\x00\......0\x00numE\x7F\x00\x00\x02\x00\x00\x00\x00
# \x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00+\xA0\x01\x00\x00\xAC\x01\x00
# \x00\xCA\x01\x00\x00\xD6\x01\x00\x00\xED\x01\x00\x00extra_data"
//}
@see RubyVM::InstructionSequence.load_from_binary
@see RubyVM::InstructionSequence.load_from_binary_extra_data... -
Numeric
# step(by: 1 , to: Float :: INFINITY) -> Enumerator :: ArithmeticSequence (101.0) -
self からはじめ step を足しながら limit を越える 前までブロックを繰り返します。step は負の数も指定できます。また、limit や step には Float なども 指定できます。
...erator を返します。
@return 特に limit (または to) と step の両方が Numeric または nil の時は
Enumerator::ArithmeticSequence を返します。
@raise ArgumentError step に 0 を指定した場合に発生します。
//emlist[例][ruby]{
2.step(5){|n| p n}
2
3
4
5... -
Numeric
# step(by: , to: -Float :: INFINITY) -> Enumerator :: ArithmeticSequence (101.0) -
self からはじめ step を足しながら limit を越える 前までブロックを繰り返します。step は負の数も指定できます。また、limit や step には Float なども 指定できます。
...erator を返します。
@return 特に limit (または to) と step の両方が Numeric または nil の時は
Enumerator::ArithmeticSequence を返します。
@raise ArgumentError step に 0 を指定した場合に発生します。
//emlist[例][ruby]{
2.step(5){|n| p n}
2
3
4
5... -
Numeric
# step(limit , step = 1) -> Enumerator :: ArithmeticSequence (101.0) -
self からはじめ step を足しながら limit を越える 前までブロックを繰り返します。step は負の数も指定できます。また、limit や step には Float なども 指定できます。
...erator を返します。
@return 特に limit (または to) と step の両方が Numeric または nil の時は
Enumerator::ArithmeticSequence を返します。
@raise ArgumentError step に 0 を指定した場合に発生します。
//emlist[例][ruby]{
2.step(5){|n| p n}
2
3
4
5... -
Range
# %(s) -> Enumerator :: ArithmeticSequence (101.0) -
範囲内の要素を s おきに繰り返します。
...指定した時は self を返します。
@return ブロックを指定しなかった時かつ数値の Range の時は Enumerator::ArithmeticSequence を返します。
@return ブロックを指定しなかったその他の Range の時は Enumerator を返します。(例: String の Range)
/... -
Range
# step(s = 1) -> Enumerator :: ArithmeticSequence (101.0) -
範囲内の要素を s おきに繰り返します。
...指定した時は self を返します。
@return ブロックを指定しなかった時かつ数値の Range の時は Enumerator::ArithmeticSequence を返します。
@return ブロックを指定しなかったその他の Range の時は Enumerator を返します。(例: String の Range)
/... -
Encoding
:: Converter # primitive _ errinfo -> Array (25.0) -
直前の Encoding::Converter#primitive_convert による変換の結果を保持する五要素の配列を返します。
...adagain_bytes] という五要素の配列
result は直前の primitive_convert の戻り値です。
それ以外の四要素は :invalid_byte_sequence か :incomplete_input か :undefined_conversion だった場合に意味を持ちます。
enc1 はエラーの発生した原始変換の変換.......
ec = Encoding::Converter.new("EUC-JP", "Shift_JIS")
ec.primitive_convert(src="\xff", dst="", nil, 10)
p ec.primitive_errinfo
#=> [:invalid_byte_sequence, "EUC-JP", "Shift_JIS", "\xFF", ""]
# HIRAGANA LETTER A (\xa4\xa2 in EUC-JP) is not representable in ISO-8859-1.
# Since this error is occur in......Encoding::Converter.new("UTF-16BE", "UTF-8")
ec.primitive_convert(src="\xd8\x00\x00@", dst="", nil, 10)
p ec.primitive_errinfo
#=> [:invalid_byte_sequence, "UTF-16BE", "UTF-8", "\xD8\x00", "\x00"]
p src
#=> "@"
# Similar to UTF-16BE, \x00\xd8@\x00 is invalid as UTF-16LE.
# The problem is detected b... -
Net
:: IMAP :: FetchData # seqno -> Integer (23.0) -
メッセージの sequence number を返します。
...メッセージの sequence number を返します。
Net::IMAP#uid_fetch、Net::IMAP#uid_storeであっても
UID ではなく、sequence numberを返します。...