173件ヒット
[1-100件を表示]
(0.110秒)
クラス
-
Benchmark
:: Job (22) -
Benchmark
:: Report (22) -
Benchmark
:: Tms (22) - Module (11)
-
RubyVM
:: InstructionSequence (44) -
Thread
:: Backtrace :: Location (22) - UncaughtThrowError (30)
検索結果
先頭5件
-
RubyVM
:: InstructionSequence # label -> String (18126.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 (18114.0) -
self が表すフレームのラベルを返します。通常、メソッド名、クラス名、モ ジュール名などで構成されます。
...フレームのラベルを返します。通常、メソッド名、クラス名、モ
ジュール名などで構成されます。
例: Thread::Backtrace::Location の例1を用いた例
//emlist[][ruby]{
loc = c(0..1).first
loc.label # => "a"
//}
@see Thread::Backtrace::Location#base_label... -
Benchmark
:: Tms # label -> String (18102.0) -
ラベル。
ラベル。 -
Thread
:: Backtrace :: Location # base _ label -> String (6130.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 (6126.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... -
Benchmark
:: Job # item(label = "") { . . . } -> self (109.0) -
与えられたラベルとブロックをジョブリストに登録します。
...与えられたラベルとブロックをジョブリストに登録します。
@param label ラベル... -
Benchmark
:: Job # report(label = "") { . . . } -> self (109.0) -
与えられたラベルとブロックをジョブリストに登録します。
...与えられたラベルとブロックをジョブリストに登録します。
@param label ラベル... -
Benchmark
:: Report # item(label = "" , *fmt) { . . . } -> Benchmark :: Tms (109.0) -
ラベルと与えられたブロックの実行時間を標準出力に出力します。
...ラベルと与えられたブロックの実行時間を標準出力に出力します。
出力のフォーマットは Benchmark::Tms#format が行います。
@param label ラベル
@param fmt 結果に出力したいオブジェクト
@see Benchmark::Tms#format... -
Benchmark
:: Report # report(label = "" , *fmt) { . . . } -> Benchmark :: Tms (109.0) -
ラベルと与えられたブロックの実行時間を標準出力に出力します。
...ラベルと与えられたブロックの実行時間を標準出力に出力します。
出力のフォーマットは Benchmark::Tms#format が行います。
@param label ラベル
@param fmt 結果に出力したいオブジェクト
@see Benchmark::Tms#format... -
UncaughtThrowError
# tag -> object (13.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
//}...