541件ヒット
[1-100件を表示]
(0.079秒)
ライブラリ
- ビルトイン (168)
-
rubygems
/ commands / which _ command (12) -
rubygems
/ config _ file (12)
クラス
- Exception (12)
-
Gem
:: ConfigFile (12) - Thread (36)
-
Thread
:: Backtrace :: Location (84)
モジュール
- Kernel (24)
キーワード
-
DEFAULT
_ BACKTRACE (12) - Location (12)
-
NEWS for Ruby 3
. 0 . 0 (5) -
NEWS for Ruby 3
. 1 . 0 (4) - Rubyの起動 (4)
- Ruby用語集 (12)
- WhichCommand (12)
-
absolute
_ path (12) -
backtrace
_ locations (36) -
base
_ label (12) -
caller
_ locations (24) - inspect (12)
- label (12)
- lineno (12)
-
make
_ backtrace (12) - path (12)
-
rb
_ backtrace (12) -
rubygems
/ commands / build _ command (12) -
rubygems
/ commands / cert _ command (12) -
rubygems
/ commands / check _ command (12) -
rubygems
/ commands / cleanup _ command (12) -
rubygems
/ commands / contents _ command (12) -
rubygems
/ commands / dependency _ command (12) -
rubygems
/ commands / environment _ command (12) -
rubygems
/ commands / fetch _ command (12) -
rubygems
/ commands / generate _ index _ command (12) -
rubygems
/ commands / help _ command (12) -
rubygems
/ commands / install _ command (12) -
rubygems
/ commands / list _ command (12) -
rubygems
/ commands / lock _ command (12) -
rubygems
/ commands / mirror _ command (12) -
rubygems
/ commands / outdated _ command (12) -
rubygems
/ commands / pristine _ command (12) -
rubygems
/ commands / query _ command (12) -
rubygems
/ commands / rdoc _ command (12) -
rubygems
/ commands / search _ command (12) -
rubygems
/ commands / server _ command (12) -
rubygems
/ commands / sources _ command (12) -
rubygems
/ commands / specification _ command (12) -
rubygems
/ commands / uninstall _ command (12) -
rubygems
/ commands / unpack _ command (12) -
set
_ backtrace (12) -
to
_ s (12)
検索結果
先頭5件
- Thread
# backtrace -> [String] | nil - Gem
:: ConfigFile :: DEFAULT _ BACKTRACE -> false - Thread
# backtrace _ locations(range) -> [Thread :: Backtrace :: Location] | nil - Thread
# backtrace _ locations(start = 0 , length = nil) -> [Thread :: Backtrace :: Location] | nil - Exception
# backtrace _ locations -> [Thread :: Backtrace :: Location]
-
Thread
# backtrace -> [String] | nil (21113.0) -
スレッドの現在のバックトレースを返します。
...class C1
def m1
sleep 5
end
def m2
m1
end
end
th = Thread.new {C1.new.m2; Thread.stop}
th.backtrace
# => [
# [0] "(irb):3:in `sleep'",
# [1] "(irb):3:in `m1'",
# [2] "(irb):6:in `m2'",
# [3] "(irb):10:in `block in irb_binding'"
# ]
th.kill
th.backtrace # =>... -
Gem
:: ConfigFile :: DEFAULT _ BACKTRACE -> false (12201.0) -
バックトレースが表示されるかどうかのデフォルト値です。
バックトレースが表示されるかどうかのデフォルト値です。 -
Thread
# backtrace _ locations(range) -> [Thread :: Backtrace :: Location] | nil (9332.0) -
スレッドの現在のバックトレースを Thread::Backtrace::Location の配 列で返します。
...スレッドの現在のバックトレースを Thread::Backtrace::Location の配
列で返します。
引数で指定した値が範囲外の場合、スレッドがすでに終了している場合は nil
を返します。
@param start 開始フレームの位置を数値で指定します......似ていますが、本メソッドは self に限定
した情報を返します。
//emlist[例][ruby]{
thread = Thread.new { sleep 1 }
thread.run
thread.backtrace_locations # => ["/path/to/test.rb:1:in `sleep'", "/path/to/test.rb:1:in `block in <main>'"]
//}
@see Thread::Backtrace::Location... -
Thread
# backtrace _ locations(start = 0 , length = nil) -> [Thread :: Backtrace :: Location] | nil (9332.0) -
スレッドの現在のバックトレースを Thread::Backtrace::Location の配 列で返します。
...スレッドの現在のバックトレースを Thread::Backtrace::Location の配
列で返します。
引数で指定した値が範囲外の場合、スレッドがすでに終了している場合は nil
を返します。
@param start 開始フレームの位置を数値で指定します......似ていますが、本メソッドは self に限定
した情報を返します。
//emlist[例][ruby]{
thread = Thread.new { sleep 1 }
thread.run
thread.backtrace_locations # => ["/path/to/test.rb:1:in `sleep'", "/path/to/test.rb:1:in `block in <main>'"]
//}
@see Thread::Backtrace::Location... -
Exception
# backtrace _ locations -> [Thread :: Backtrace :: Location] (6352.0) -
バックトレース情報を返します。Exception#backtraceに似ていますが、 Thread::Backtrace::Location の配列を返す点が異なります。
...ion#backtraceに似ていますが、
Thread::Backtrace::Location の配列を返す点が異なります。
現状では Exception#set_backtrace によって戻り値が変化する事はあり
ません。
//emlist[例: test.rb][ruby]{
require "date"
def check_long_month(month)
return if Date.......new(2000, month, -1).day == 31
raise "#{month} is not long month"
end
def get_exception
return begin
yield
rescue => e
e
end
end
e = get_exception { check_long_month(2) }
p e.backtrace_locations
# => ["test.rb:4:in `check_long_month'", "test.rb:15:in `block in <main>'", "test.rb:9:......in `get_exception'", "test.rb:15:in `<main>'"]
//}
@see Exception#backtrace... -
static VALUE make
_ backtrace(void) (6200.0) -
-
static void set
_ backtrace(VALUE info , VALUE bt) (6200.0) -
-
void rb
_ backtrace(void) (6200.0) -
-
Thread
:: Backtrace :: Location # base _ label -> String (6022.0) -
self が表すフレームの基本ラベルを返します。通常、 Thread::Backtrace::Location#label から修飾を取り除いたもので構成 されます。
...ead::Backtrace::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......# => initialize
# new
# <main>
//}
@see Thread::Backtrace::Location#label...