るりまサーチ

最速Rubyリファレンスマニュアル検索!
1030件ヒット [101-200件を表示] (0.135秒)
トップページ > クエリ:a[x] > クエリ:exit[x]

別のキーワード

  1. _builtin to_a
  2. matrix to_a
  3. to_a
  4. dbm to_a
  5. argf.class to_a

ライブラリ

モジュール

検索結果

<< < 1 2 3 4 ... > >>

static VALUE localjump_exitstatus(VALUE exc) (12300.0)

static VALUE rb_f_at_exit(void) (12300.0)

Kernel.#at_exit { ... } -> Proc (12261.0)

与えられたブロックをインタプリタ終了時に実行します。

...クをインタプリタ終了時に実行します。

a
t_exitがメソッドである点を除けば、END ブロックによる終了
処理の登録と同等です。登録した処理を取り消すことはできません。
spec/terminateも参照してください。

@return 登録した処...
...Proc オブジェクトで返します。

//emlist[例][ruby]{
3.times do |i|
a
t_exit{puts "at_exit#{i}"}
end
END{puts "END"}
a
t_exit{puts "at_exit"}
puts "main_end"

#=> main_end
# at_exit
# END
# at_exit2
# at_exit1
# at_exit0
//}

@see d:spec/control#END,Kernel.#exit!,Kernel.#fork...

IRB.irb_at_exit -> () (12217.0)

at_exit で登録された処理を実行します。

...
a
t_exit で登録された処理を実行します。

ユーザが直接使用するものではありません。...

static VALUE rb_thread_exit(void) (12200.0)

絞り込み条件を変える

Readline.#readline(prompt = "", add_hist = false) -> String | nil (9224.0)

prompt を出力し、ユーザからのキー入力を待ちます。 エンターキーの押下などでユーザが文字列を入力し終えると、 入力した文字列を返します。 このとき、add_hist が true であれば、入力した文字列を入力履歴に追加します。 何も入力していない状態で EOF(UNIX では ^D) を入力するなどで、 ユーザからの入力がない場合は nil を返します。

...ます。
エンターキーの押下などでユーザが文字列を入力し終えると、
入力した文字列を返します。
このとき、add_hist が true であれば、入力した文字列を入力履歴に追加します。
何も入力していない状態で EOF(UNIX では ^D)...
...は行内編集が可能で、vi モードと Emacs モードが用意されています。
デフォルトは Emacs モードです。

@param prompt カーソルの前に表示する文字列を指定します。デフォルトは""です。
@param add_hist 真ならば、入力した文字列を...
...'readline'

stty_save = `stty -g`.chomp
begin
while buf = Readline.readline
p buf
end
rescue Interrupt
system("stty", stty_save)
exit

end

例: INTシグナルを捕捉して、端末状態を復帰する。

require 'readline'

stty_save = `stty -g`.chomp
trap(...

Etc::SC_ATEXIT_MAX -> Integer (9200.0)

Etc.#sysconf の引数に指定します。

Etc.#sysconf の引数に指定します。

詳細は sysconf(3) を参照してください。

PTY::ChildExited#status -> Process::Status (9200.0)

子プロセスの終了ステータスをProcess::Statusオブジェクトで返します。

...子プロセスの終了ステータスをProcess::Statusオブジェクトで返します。...

Thread#terminate -> self (9125.0)

スレッドの実行を終了させます。終了時に ensure 節が実行されます。

...

ただし、スレッドは終了処理中(aborting)にはなりますが、
直ちに終了するとは限りません。すでに終了している場合は何もしません。このメソッドにより
終了したスレッドの Thread#value の返り値は不定です。
自身がメイ...
...#exit(0)
により終了します。

Kernel.#exit と違い例外 SystemExit を発生しません。

th1 = Thread.new do
begin
sleep 10
ensure
p "this will be displayed"
end
end

sleep 0.1
th1.kill

#=> "this will be displayed"

@see Kernel.#exit, Kernel.#exit!...

SystemExit#status -> Integer (9118.0)

例外オブジェクトに保存された終了ステータスを返します。

...します。

終了ステータスは Kernel.#exit や SystemExit.new などで設定されます。

例:

begin
exit
1
rescue SystemExit => err
p err.status # => 1
end

begin
raise SystemExit.new(1, "dummy exit")
rescue SystemExit => err
p err.status # => 1
end...

絞り込み条件を変える

<< < 1 2 3 4 ... > >>