33件ヒット
[1-33件を表示]
(0.028秒)
トップページ > :RubyVM::InstructionSequence#base_label
別のキーワード
種類
- インスタンスメソッド (22)
- 文書 (11)
ライブラリ
- ビルトイン (22)
クラス
キーワード
-
NEWS for Ruby 2
. 0 . 0 (11) -
base
_ label (11) - label (11)
検索結果
先頭3件
-
RubyVM
:: InstructionSequence # base _ label -> String (23000.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... -
NEWS for Ruby 2
. 0 . 0 (6.0) -
NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...加: RubyVM::InstructionSequence#path,
RubyVM::InstructionSequence#absolute_path,
RubyVM::InstructionSequence#label,
RubyVM::InstructionSequence#base_label,
RubyVM::InstructionSequence#first_lineno to retrieve information from where
the instruction sequence was defined.... -
RubyVM
:: InstructionSequence # label -> String (6.0) -
self が表す命令シーケンスのラベルを返します。通常、メソッド名、クラス名、 モジュール名などで構成されます。
...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...