種類
- 文書 (22)
- インスタンスメソッド (11)
- モジュール関数 (11)
- 特異メソッド (11)
ライブラリ
- ビルトイン (33)
クラス
- SystemExit (22)
モジュール
- Kernel (11)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - exit (11)
- new (11)
-
ruby 1
. 8 . 2 feature (11)
検索結果
先頭5件
-
SystemExit
# status -> Integer (27137.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... -
SystemExit
. new(status = 0 , error _ message = "") -> SystemExit (9236.0) -
SystemExit オブジェクトを生成して返します。
...
SystemExit オブジェクトを生成して返します。
@param status 終了ステータスを整数で指定します。
@param error_message エラーメッセージを文字列で指定します。
例:
ex = SystemExit.new(1)
p ex.status # => 1... -
Kernel
. # exit(status = true) -> () (147.0) -
Rubyプログラムの実行を終了します。status として整 数が与えられた場合、その値を Ruby コマンドの終了ステータスとします。 デフォルトの終了ステータスは 0(正常終了)です。
...Rubyプログラムの実行を終了します。status として整
数が与えられた場合、その値を Ruby コマンドの終了ステータスとします。
デフォルトの終了ステータスは 0(正常終了)です。
status が true の場合 0、 false の場合 1 を引数に......で、正確には環境依存です。
exit は例外 SystemExit を発生させ
ることによってプログラムの実行を終了させますので、
必要に応じて begin 節で捕捉することができます。
@param status 終了ステータスを整数か true または false で......uts 'start'
begin
puts 'start1...'
exit
rescue SystemExit => err
puts "end1 with #{err.inspect}"
end
begin
puts 'start2...'
exit
ensure
puts 'end2...'
end
puts 'end' #実行されない
#=> start
# start1...
# end1 with #<SystemExit: exit>
# start2...
# end2...
#終了ステー... -
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (72.0) -
1.6.8から1.8.0への変更点(まとめ) * ((<1.6.8から1.8.0への変更点(まとめ)/インタプリタの変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたクラス/モジュール>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたメソッド>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加された定数>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張されたクラス/メソッド(互換性のある変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/変更されたクラス/メソッド(互換性のない変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/文法の変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/正規表現>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Marshal>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Windows 対応>)) * ((<1.6.8から1.8.0への変更点(まとめ)/廃止された(される予定の)機能>)) * ((<1.6.8から1.8.0への変更点(まとめ)/ライブラリ>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張ライブラリAPI>)) * ((<1.6.8から1.8.0への変更点(まとめ)/バグ修正>)) * ((<1.6.8から1.8.0への変更点(まとめ)/サポートプラットフォームの追加>))
...Method オブジェクト限定でした。
これに伴い Proc#to_proc が追加されました。
: 終了ステータス [compat]
raise SystemExit したときに終了ステータス 1 で終了するようになりました。
((<ruby-dev:16776>))
: ((<"rescue/ensure on begin .. end w......: ((<Process::GID>)) [new]
: ((<Process::Sys>)) [new]
: ((<Signal>)) モジュール [new]
: ((<Process::Status>)) [new]
: ((<NoMethodError>)) [new]
((<Process::Status>)) の追加により、(({$?})) の値も整数からこのクラ
スのインスタンスになりました......Process.exit>)) [new]
追加。関数 abort, exit と同じ。
: ((<Process/Process.waitall>)) [new]
追加
: ((<Process::Status#pid|Process::Status/pid>)) [new]
追加
=== Range
: ((<Range#step|Range/step>)) [new]
追加。step ごとの要素で繰り返します。
: (... -
ruby 1
. 8 . 2 feature (18.0) -
ruby 1.8.2 feature ruby 1.8.2 での ruby 1.8.1 からの変更点です。
...を保存するファイルの mode をデフォルトで 0600 に
セットするようになりました。
=== 2004-07-16
: ((<SystemExit#success?|SystemExit/success?>)) [ruby] [new]
追加。((<ruby-dev:23912>))
: File::Stat#dev_major [ruby] [new]
: File::Stat#dev_minor [ruby] [new]
((......w]
: GDBM::NEWDB [lib] [new]
GDBM に read only などで access できるようになりました。((<ruby-dev:23381>))
: Process::Status#success? [ruby][new]
((<ruby-dev:23385>))
=== 2004-04-11
: ruby.c [ruby] [bug]
オプション --with-static-linked-ext 付きでコン...