2014-03-11から1日間の記事一覧
Rubyのexit関数はSystemExit例外を投げます。 begin exit rescue StandardError puts $!.class rescue SystemExit puts $!.class ensure puts "ensure" end puts "end" 実行結果は以下のとおり。 SystemExit ensure end
Rubyのexit関数はSystemExit例外を投げます。 begin exit rescue StandardError puts $!.class rescue SystemExit puts $!.class ensure puts "ensure" end puts "end" 実行結果は以下のとおり。 SystemExit ensure end