るりまサーチ

最速Rubyリファレンスマニュアル検索!
64件ヒット [1-64件を表示] (0.262秒)
トップページ > クエリ:RubyVM::InstructionSequence#label[x]

別のキーワード

  1. new openssl::bn
  2. new openssl::asn1::asn1data
  3. new openssl::pkey::ec::group
  4. new openssl::x509::certificate
  5. start net::smtp

ライブラリ

キーワード

検索結果

RubyVM::InstructionSequence#label -> String (62161.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...
...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#base_label -> String (27167.0)

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
de...
...# irb
> iseq = RubyVM::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#inspect -> String (21036.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#to_a -> Array (21012.0)

self の情報を 14 要素の配列にして返します。

...:local_size: ローカル変数の総数 + 1。

:stack_max: スタックの深さ。(SystemStackError を検出するために使用)

: #label

メソッド名、クラス名、モジュール名などで構成される命令シーケンスのラ
ベル。トップレベルでは "<ma...
...の指定が必須のメソッド、ブロックの引数の個数。あるいは以下のよう
な配列。

[required_argc, [optional_arg_labels, ...],
splat_index, post_splat_argc, post_splat_index,
block_index, simple]

より詳細な情報については、vm_core.h を参...
...ytecode

命令シーケンスを構成する命令とオペランドの配列の配列。


//emlist[例][ruby]{
require 'pp'

iseq = RubyVM::InstructionSequence.compile('num = 1 + 2')
pp iseq.to_a
# ※ Ruby 2.5.0 での実行結果
# => ["YARVInstructionSequence/SimpleDataFormat",
# 2,
# 0,
# 1...

NEWS for Ruby 2.0.0 (54.0)

NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...* 追加: RubyVM::InstructionSequence.of to get the instruction sequence
from a method or a block.
* 追加: RubyVM::InstructionSequence#path,
RubyVM::InstructionSequence
#absolute_path,
RubyVM::InstructionSequence#label
,
RubyVM::InstructionSequence
#base_label,
Rub...

絞り込み条件を変える

NEWS for Ruby 2.3.0 (42.0)

NEWS for Ruby 2.3.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...eue#close(Thread::Queue#close) を追加
10600

* Regexp/String: Unicode のバージョンを 7.0.0 から 8.0.0 に更新

* RubyVM::InstructionSequence
* 実験的な機能としてiseqローダー用の低レベルな操作をするメソッドをいくつか追加
使用例...
...致命的な問題を起こすことができます。
11788
* RubyVM::InstructionSequence#to_binary(extra_data = nil)
* RubyVM::InstructionSequence.load_from_binary(binary)
* RubyVM::InstructionSequence.load_from_binary_extra_data(binary)

* String
* フリーズされ...
...* RubyGems 2.5.1 に更新しました。
* http://docs.seattlerb.org/rubygems/History_txt.html#label-2.5.0+-2F+2015-11-03
* http://docs.seattlerb.org/rubygems/History_txt.html#label-2.5.1+-2F+2015-12-10

=== 組込みのグローバル変数の互換性に影響のある変更

* $S...