404件ヒット
[1-100件を表示]
(0.054秒)
別のキーワード
クラス
-
Encoding
:: Converter (88) -
Encoding
:: InvalidByteSequenceError (77) -
Enumerator
:: ArithmeticSequence (84) - Numeric (18)
- Range (12)
-
RubyVM
:: InstructionSequence (119) - TracePoint (6)
キーワード
- % (6)
- == (6)
-
absolute
_ path (11) -
base
_ label (11) - begin (6)
-
destination
_ encoding (11) -
destination
_ encoding _ name (11) - disasm (11)
- disassemble (11)
- each (12)
- end (6)
-
error
_ bytes (11) - eval (11)
-
exclude
_ end? (6) - first (12)
-
first
_ lineno (11) - hash (6)
-
incomplete
_ input? (11) - inspect (17)
-
instruction
_ sequence (6) - label (11)
- last (12)
-
last
_ error (11) - path (11)
-
primitive
_ convert (44) -
primitive
_ errinfo (11) - putback (22)
-
readagain
_ bytes (11) - size (6)
-
source
_ encoding (11) -
source
_ encoding _ name (11) - step (30)
-
to
_ a (11) -
to
_ binary (9)
検索結果
先頭5件
-
TracePoint
# instruction _ sequence -> RubyVM :: InstructionSequence (6316.0) -
script_compiledイベント発生時にコンパイルされた RubyVM::InstructionSequenceインスタンスを返します。
...生時にコンパイルされた
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
//}
@rais... -
Encoding
:: InvalidByteSequenceError # incomplete _ input? -> bool (3115.0) -
エラー発生時に入力文字列が不足している場合に真を返します。
...ing::InvalidByteSequenceError
p $!
#=> #<Encoding::InvalidByteSequenceError: "\xA1" followed by "z" on EUC-JP>
p $!.incomplete_input? #=> false
end
begin
ec.convert("abc\xA1")
ec.finish
rescue Encoding::InvalidByteSequenceError
p $! #=> #<Encoding::InvalidByteSequenceError: incomplet......e "\xA1" on EUC-JP>
p $!.incomplete_input? #=> true
end
//}... -
RubyVM
:: InstructionSequence # absolute _ path -> String | nil (3115.0) -
self が表す命令シーケンスの絶対パスを返します。
...byVM::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.absolute_path
# => nil
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/method.rb
def hello
puts "hello, world"
end
# irb
> iseq = RubyVM::......InstructionSequence.compile_file('/tmp/method.rb')
> iseq.absolute_path # => "/tmp/method.rb"
@see RubyVM::InstructionSequence#path... -
RubyVM
:: InstructionSequence # base _ label -> String (3115.0) -
self が表す命令シーケンスの基本ラベルを返します。
...M::InstructionSequence.compile('num = 1 + 2')
# => <RubyVM::InstructionSequence:<compiled>@<compiled>>
iseq.base_label
# => "<compiled>"
例2: RubyVM::InstructionSequence.compile_file を使用した場合
# /tmp/method.rb
def hello
puts "hello, world"
end
# irb
> iseq = RubyV......M::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.base_label # => "<main>"
例3:
# /tmp/method2.rb
def hello
puts "hello, world"
end
RubyVM::InstructionSequence.of(method(:hello)).base_label
# => "hello"
@see RubyVM::InstructionSequence#label... -
RubyVM
:: InstructionSequence # label -> String (3115.0) -
self が表す命令シーケンスのラベルを返します。通常、メソッド名、クラス名、 モジュール名などで構成されます。
..."<main>" を返します。self を文字列から作成していた場合
は "<compiled>" を返します。
例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
puts "hello, world"
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 (3115.0) -
self が表す命令シーケンスの相対パスを返します。
...ていた
場合は "<compiled>" を返します。
例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... -
Encoding
:: InvalidByteSequenceError # error _ bytes -> String (3109.0) -
エラー発生時に捨てられたバイト列を返します。
...\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... -
RubyVM
:: InstructionSequence # disasm -> String (3109.0) -
self が表す命令シーケンスを人間が読める形式の文字列に変換して返します。
...InstructionSequence.compile('1 + 2').disasm
出力:
== disasm: <RubyVM::InstructionSequence:<compiled>@<compiled>>==========
0000 trace 1 ( 1)
0002 putobject 1
0004 putobject 2
0006 opt_plus <ic:1>
0008 le......ave
@see RubyVM::InstructionSequence.disasm... -
RubyVM
:: InstructionSequence # disassemble -> String (3109.0) -
self が表す命令シーケンスを人間が読める形式の文字列に変換して返します。
...InstructionSequence.compile('1 + 2').disasm
出力:
== disasm: <RubyVM::InstructionSequence:<compiled>@<compiled>>==========
0000 trace 1 ( 1)
0002 putobject 1
0004 putobject 2
0006 opt_plus <ic:1>
0008 le......ave
@see RubyVM::InstructionSequence.disasm... -
Encoding
:: InvalidByteSequenceError # destination _ encoding -> Encoding (3103.0) -
エラーを発生させた変換の変換先のエンコーディングを Encoding オブジェクトで返します。
...エラーを発生させた変換の変換先のエンコーディングを Encoding
オブジェクトで返します。
@see Encoding::InvalidByteSequenceError#source_encoding,
Encoding::UndefinedConversionError#destination_encoding...