るりまサーチ (Ruby 2.4.0)

最速Rubyリファレンスマニュアル検索!
3件ヒット [1-3件を表示] (0.013秒)
トップページ > モジュール:Kernel[x] > バージョン:2.4.0[x] > クエリ:proc[x] > 種類:変数[x]

別のキーワード

  1. _builtin to_proc
  2. _builtin proc
  3. proc curry
  4. httpserver mount_proc
  5. readline completion_proc

ライブラリ

キーワード

検索結果

Kernel$$PROCESS_ID -> Integer (9307.0)

$$ の別名

$$ の別名

require "English"

p sprintf("something%s", $PID) #=> "something5543" など

Kernel$$? -> Process::Status | nil (307.0)

このスレッドで最後に終了した子プロセスのステータスです。

このスレッドで最後に終了した子プロセスのステータスです。

Process::Status オブジェクトが入っています。
子プロセスの終了時ステータスは Process::Status#exitstatus で得られます。

この変数はスレッドローカルで読み取り専用です。

@see Process.#wait

Kernel$$CHILD_STATUS -> Process::Status | nil (307.0)

$? の別名

$? の別名

require "English"

out = `wget https://www.ruby-lang.org/en/about/license.txt -O - 2>/dev/null`

if $CHILD_STATUS.to_i == 0
print "wget success\n"
out.split(/\n/).each { |line|
printf "%s\n", line
}
else
print "wget failed\n"
end