るりまサーチ

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

別のキーワード

  1. _builtin label
  2. logger sev_label
  3. _builtin base_label
  4. tms label
  5. location label

キーワード

検索結果

<< 1 2 > >>

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

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

...iled>@<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...

Thread::Backtrace::Location#label -> String (18116.0)

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

...フレームのラベルを返します。通常、メソッド名、クラス名、モ
ジュール名などで構成されます。

例: Thread::Backtrace::Location の例1を用いた例

//emlist[][ruby]{
loc = c(0..1).first
loc.label # => "a"
//}

@see Thread::Backtrace::Location#base_label...

Thread::Backtrace::Location#base_label -> String (6132.0)

self が表すフレームの基本ラベルを返します。通常、 Thread::Backtrace::Location#label から修飾を取り除いたもので構成 されます。

...race::Location#label から修飾を取り除いたもので構成
されます。

//emlist[例][ruby]{
# foo.rb
class Foo
attr_accessor :locations
def initialize(skip)
@locations = caller_locations(skip)
end
end

Foo.new(0..2).locations.map do |call|
puts call.base_label
end

# => init...
...ialize
# new
# <main>
//}

@see Thread::Backtrace::Location#label...

RubyVM::InstructionSequence#base_label -> String (6128.0)

self が表す命令シーケンスの基本ラベルを返します。

...ompiled>>
iseq.base_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.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...

UncaughtThrowError#tag -> object (15.0)

Kernel.#throw に指定した tag を返します。

...Kernel.#throw に指定した tag を返します。

//emlist[例:][ruby]{
def do_complicated_things
throw :uncaught_label
end

begin
do_complicated_things
rescue UncaughtThrowError => ex
p ex.tag # => ":uncaught_label"
end
//}...

絞り込み条件を変える

UncaughtThrowError#to_s -> String (15.0)

self を tag を含む文字列表現にして返します。

...self を tag を含む文字列表現にして返します。

//emlist[例][ruby]{
def do_complicated_things
throw :uncaught_label
end

begin
do_complicated_things
rescue UncaughtThrowError => ex
p ex.to_s # => "uncaught throw :uncaught_label"
end
//}...

Module#using(module) -> self (9.0)

引数で指定したモジュールで定義された拡張を現在のクラス、モジュールで有 効にします。

...ルで有
効にします。

有効にした拡張の有効範囲については以下を参照してください。

* https://docs.ruby-lang.org/en/master/syntax/refinements_rdoc.html#label-Scope

@param module 有効にするモジュールを指定します。

@see Module#refine, main.using...

RubyVM::InstructionSequence#inspect -> String (9.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 (9.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 を参...

UncaughtThrowError#value -> object (9.0)

Kernel.#throw に指定した value を返します。

...Kernel.#throw に指定した value を返します。

//emlist[例][ruby]{
def do_complicated_things
throw :uncaught_label, "uncaught_value"
end

begin
do_complicated_things
rescue UncaughtThrowError => ex
p ex.value # => "uncaught_value"
end
//}...

絞り込み条件を変える

<< 1 2 > >>