るりまサーチ (Ruby 2.6.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.017秒)
トップページ > クエリ:caller[x] > バージョン:2.6.0[x] > クエリ:===[x] > 種類:クラス[x]

別のキーワード

  1. kernel caller
  2. _builtin caller
  3. kernel caller_locations
  4. _builtin caller_locations
  5. caller

ライブラリ

キーワード

検索結果

Thread::Backtrace::Location (148.0)

Ruby のフレームを表すクラスです。

...例1の実行結果:

caller_locations.rb:2:in `a'
caller_locations.rb:5:in `b'
caller_locations.rb:8:in `c'

//emlist[例2][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|
p...

Process::Status (40.0)

プロセスの終了ステータスを表すクラスです。 メソッド Process.#wait2 などの返り値として使われます。

プロセスの終了ステータスを表すクラスです。
メソッド Process.#wait2 などの返り値として使われます。

=== 使用例

wait を使用した例

fork { exit }
Process.wait
case
when $?.signaled?
p "child #{$?.pid} was killed by signal #{$?.termsig}"
if $?.coredump? # システムがこのステータスをサポートしてなければ常にfalse
p "child #{$?.pid} dumped core."
end
...