るりまサーチ

最速Rubyリファレンスマニュアル検索!
15件ヒット [1-15件を表示] (0.209秒)
トップページ > クエリ:-[x] > クエリ:r[x] > クエリ:d[x] > クエリ:get[x] > クエリ:backtrace_locations[x]

別のキーワード

  1. bigdecimal/util to_d
  2. float to_d
  3. eigenvaluedecomposition d
  4. bigdecimal to_d
  5. rational to_d

ライブラリ

クラス

検索結果

Exception#backtrace_locations -> [Thread::Backtrace::Location] (24531.0)

バックトレース情報を返します。Exception#backtraceに似ていますが、 Thread::Backtrace::Location の配列を返す点が異なります。

...n#backtraceに似ていますが、
Thread::Backtrace::Location の配列を返す点が異なります。

現状では Exception#set_backtrace によって戻り値が変化する事はあり
ません。

//emlist[例: test.rb][ruby]{
r
equire "date"
d
ef check_long_month(month)
r
eturn if Date.ne...
...onth, -1).day == 31
r
aise "#{month} is not long month"
end

d
ef get_exception
r
eturn begin
yield
r
escue => 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_exc...
...eption'", "test.rb:15:in `<main>'"]
//}

@see Exception#backtrace...

NEWS for Ruby 3.0.0 (3330.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...NEWS for Ruby 3.0.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス...
...様の変更

* Keyword arguments are now separated from positional arguments.
Code that resulted in deprecation warnings in Ruby 2.7 will now
r
esult in ArgumentError or different behavior. 14183
* Procs accepting a single rest argument and keywords are no longer
subject to autosplat...
...] # and deprecation warning
# 3.0 => a=>1}, {}]
//}

* Arguments forwarding (`...`) now supports leading arguments.
16378

//emlist{
d
ef method_missing(meth, ...)
send(:"do_#{meth}", ...)
end
//}

* Pattern matching (`case/in`) is no longer experimental. 17260
* One-line pattern matc...