るりまサーチ

最速Rubyリファレンスマニュアル検索!
24件ヒット [1-24件を表示] (0.104秒)

別のキーワード

  1. fiddle ruby_free
  2. fiddle build_ruby_platform
  3. rbconfig ruby
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

検索結果

RubyVM::InstructionSequence#base_label -> String (21132.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
def hell...
...end

# irb
> iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.base_label # => "<main>"

例3:

# /tmp/method2.rb
def hello
puts "hello, world"
end

Ruby
VM::InstructionSequence.of(method(:hello)).base_label
# => "hello"

@see RubyVM::InstructionSequence#l...

RubyVM::InstructionSequence#label -> String (3019.0)

self が表す命令シーケンスのラベルを返します。通常、メソッド名、クラス名、 モジュール名などで構成されます。

... 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 = Ruby...
...VM::InstructionSequence.compile_file('/tmp/method.rb')
> iseq.label # => "<main>"

例3:

# /tmp/method2.rb
def hello
puts "hello, world"
end

Ruby
VM::InstructionSequence.of(method(:hello)).label
# => "hello"

@see RubyVM::InstructionSequence#base_label...