77件ヒット
[1-77件を表示]
(0.033秒)
別のキーワード
種類
- インスタンスメソッド (48)
- 文書 (29)
ライブラリ
- ビルトイン (48)
キーワード
-
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 3
. 0 . 0 (5) - Ruby用語集 (12)
- backtrace (12)
検索結果
先頭5件
-
Thread
# backtrace _ locations(range) -> [Thread :: Backtrace :: Location] | nil (18114.0) -
スレッドの現在のバックトレースを Thread::Backtrace::Location の配 列で返します。
...cations と似ていますが、本メソッドは 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::... -
Thread
# backtrace _ locations(start = 0 , length = nil) -> [Thread :: Backtrace :: Location] | nil (18114.0) -
スレッドの現在のバックトレースを Thread::Backtrace::Location の配 列で返します。
...cations と似ていますが、本メソッドは 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::... -
Exception
# backtrace _ locations -> [Thread :: Backtrace :: Location] (18113.0) -
バックトレース情報を返します。Exception#backtraceに似ていますが、 Thread::Backtrace::Location の配列を返す点が異なります。
...: 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
# => ["te... -
Ruby用語集 (3855.0)
-
Ruby用語集 A B C D E F G I J M N O R S Y
...Ruby用語集
A B C D E F G I J M N O R S Y
a ka sa ta na ha ma ya ra wa
=== 記号・数字
: %記法
: % notation
「%」記号で始まる多種多様なリテラル記法の総称。
参照:d:spec/literal#percent
: 0 オリジン
: zero-ba......まること。
例えば、
エラーメッセージにおける行番号、
正規表現検索におけるキャプチャーの番号、
Ruby 2.7 で導入された番号指定ブロックパラメーター、
といったものは 1 オリジンである。
===[a:A] A
: AWK
テキ......eption#backtrace_locations で
取り出すことができる。
: スーパークラス
: superclass
クラス B がクラス A のサブクラスであるとき、A を B のスーパークラス
と呼ぶ。
「親クラス」「上位クラス」と呼ぶこともある。
Ruby で... -
NEWS for Ruby 3
. 0 . 0 (3195.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...NEWS for Ruby 3.0.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス......in Ruby 2.7 will now
result in ArgumentError or different behavior. 14183
* Procs accepting a single rest argument and keywords are no longer
subject to autosplatting. This now matches the behavior of Procs
accepting a single rest argument and no keywords.
16166
//emlist[][ruby]{......non-blocking execution contexts. 16786
* Fiber#blocking? tells whether the fiber is non-blocking. 16786
* Fiber#backtrace and Fiber#backtrace_locations provide per-fiber backtrace. 16815
* The limitation of Fiber#transfer is relaxed. 17221
* GC
* GC.auto_compact= and GC.auto_compa... -
NEWS for Ruby 2
. 0 . 0 (3087.0) -
NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...NEWS for Ruby 2.0.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス......トは ChangeLog ファイルか bugs.ruby-lang.org の issue を参照してください。
== 1.9.3 以降の変更
=== 言語仕様の変更
* キーワード引数を追加しました
* %i, %I をシンボルの配列作成のために追加しました。(%w, %W に似ています)
*......ling of exceptions
* 追加: Thread#backtrace_locations Kernel#caller_locations に似た情報を返します
* 新規クラス: Thread::Backtrace::Location to hold backtrace location
information. These are returned by Thread#backtrace_locations and
Kernel#caller_locations
*... -
Exception
# backtrace -> [String] (12.0) -
バックトレース情報を返します。
...)
* "#{sourcefile}:#{sourceline}"
(トップレベルの場合)
という形式の String の配列です。
//emlist[例][ruby]{
def methd
raise
end
begin
methd
rescue => e
p e.backtrace
end
#=> ["filename.rb:2:in `methd'", "filename.rb:6"]
//}
@see Exception#backtrace_locations...