ライブラリ
クラス
- CSV (11)
-
Encoding
:: Converter (88) -
Encoding
:: InvalidByteSequenceError (77) -
Enumerator
:: ArithmeticSequence (84) -
Net
:: IMAP (97) -
Net
:: IMAP :: FetchData (11) -
Net
:: IMAP :: ThreadMember (11) - Numeric (18)
-
OpenSSL
:: X509 :: Extension (22) -
Psych
:: Handler (33) -
Psych
:: Nodes :: Sequence (77) -
RDoc
:: Context :: Section (11) - Range (12)
-
RubyVM
:: InstructionSequence (214) - Socket (11)
- TracePoint (6)
モジュール
キーワード
- % (6)
- == (6)
- ANY (11)
- BLOCK (11)
- FLOW (11)
- InvalidByteSequenceError (11)
-
MSG
_ FLUSH (22) -
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 6 . 0 (6) -
NEWS for Ruby 2
. 7 . 0 (5) - SEQUENCE (11)
-
absolute
_ path (11) - anchor (11)
-
base
_ label (11) - begin (6)
- compile (11)
-
compile
_ file (11) -
compile
_ option (11) - copy (11)
- decode (11)
-
destination
_ encoding (11) -
destination
_ encoding _ name (11) - disasm (22)
- disassemble (22)
- each (12)
- end (6)
-
end
_ sequence (11) -
error
_ bytes (11) - eval (11)
-
exclude
_ end? (6) - expunge (11)
- fetch (11)
- first (12)
-
first
_ lineno (11) - hash (6)
-
incomplete
_ input? (11) - inspect (17)
-
instruction
_ sequence (6) - label (11)
- last (12)
-
last
_ error (11) -
load
_ from _ binary (9) -
load
_ from _ binary _ extra _ data (9) - move (9)
- new (55)
- of (11)
- path (11)
-
primitive
_ convert (44) -
primitive
_ errinfo (11) - putback (22)
-
readagain
_ bytes (11) - search (11)
- seqno (22)
- size (6)
- sort (11)
-
source
_ encoding (11) -
source
_ encoding _ name (11) -
start
_ mapping (11) -
start
_ sequence (11) - step (30)
- store (11)
- style (11)
- tag (11)
-
to
_ a (11) -
to
_ binary (9) -
to
_ json _ raw _ object (11) -
uid
_ sort (11) -
uid
_ thread (11)
検索結果
先頭5件
- RDoc
:: Context :: Section # sequence -> String - RubyVM
:: InstructionSequence . load _ from _ binary(binary) -> RubyVM :: InstructionSequence - Encoding
:: InvalidByteSequenceError # destination _ encoding _ name -> String - Encoding
:: InvalidByteSequenceError # source _ encoding -> Encoding - Encoding
:: InvalidByteSequenceError # source _ encoding _ name -> Encoding
-
RDoc
:: Context :: Section # sequence -> String (27401.0) -
section のシーケンス番号を文字列で返します。
...section のシーケンス番号を文字列で返します。
リンクを作成する時に使われます。... -
RubyVM
:: InstructionSequence . load _ from _ binary(binary) -> RubyVM :: InstructionSequence (21500.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... -
Encoding
:: InvalidByteSequenceError # destination _ encoding _ name -> String (21400.0) -
エラーを発生させた変換の変換先のエンコーディングを文字列で返します。
...エラーを発生させた変換の変換先のエンコーディングを文字列で返します。
@see Encoding::InvalidByteSequenceError#destination_encoding... -
Encoding
:: InvalidByteSequenceError # source _ encoding -> Encoding (21400.0) -
エラーを発生させた変換の変換元のエンコーディングを Encoding オブジェクトで返します。
...エラーを発生させた変換の変換元のエンコーディングを Encoding
オブジェクトで返します。
@see Encoding::InvalidByteSequenceError#destination_encoding,
Encoding::UndefinedConversionError#source_encoding... -
Encoding
:: InvalidByteSequenceError # source _ encoding _ name -> Encoding (21400.0) -
エラーを発生させた変換の変換元のエンコーディングを文字列で返します。
...エラーを発生させた変換の変換元のエンコーディングを文字列で返します。
@see Encoding::InvalidByteSequenceError#source_encoding... -
RubyVM
:: InstructionSequence . load _ from _ binary _ extra _ data(binary) -> String (21400.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 # to _ binary(extra _ data = nil) -> String (21318.0) -
バイナリフォーマットでシリアライズされたiseqのデータを文字列として返します。 RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。
...て返します。
RubyVM::InstructionSequence.load_from_binary メソッドでバイナリデータに対応するiseqオブジェクトを作れます。
引数の extra_data はバイナリデータと共に保存されます。
RubyVM::InstructionSequence.load_from_binary_extra_data メソッ......_binary で得たバイナリデータは他のマシンに移動できません。他のバージョンや他のアーキテクチャのRubyで作られたバイナリデータは使用できません。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
iseq.to_binary(......"extra_data")
# ※表示の都合上改行しているが実際は改行はない
# => "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\x... -
RubyVM
:: InstructionSequence # first _ lineno -> Integer (21306.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 # inspect -> String (21300.0) -
self の情報をラベルとパスを含んだ人間に読みやすい文字列にして返します。
...んだ人間に読みやすい文字列にして返します。
//emlist[例][ruby]{
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
iseq.inspect # => "<RubyVM::InstructionSequence:<compiled>@<compiled>>"
//}
@see RubyVM::InstructionSequence#label,
RubyVM::InstructionSequence#path... -
Encoding
:: InvalidByteSequenceError (21024.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
//}...