Project

General

Profile

Actions

Bug #16424

closed

abort without arguments does not print error info

Added by znz (Kazuhiro NISHIYAMA) over 4 years ago. Updated over 4 years ago.

Status:
Closed
Target version:
-
[ruby-dev:50887]

Description

https://docs.ruby-lang.org/ja/2.0.0/method/Kernel/m/abort.html
には「引数を省略した呼び出し時に $! が nil でなければその例外の メッセージを標準エラー出力 $stderr に出力」されるとありますが、 1.9 から出力されなくなっているようです。

% docker run -it --rm rubylang/all-ruby env ALL_RUBY_SINCE=ruby-1.6 ./all-ruby -e 'begin;raise "foo";rescue;abort;end'
ruby-1.6.0            -e:1: foo (RuntimeError)
                  exit 1
...
ruby-1.8.7-p374       -e:1: foo (RuntimeError)
                  exit 1
ruby-1.9.0-0          exit 1
...
ruby-2.7.0-preview3   exit 1

笹田さんに直接確認してみたところ、バグということだったので、チケットとして登録しておきます。

Actions

Also available in: Atom PDF

Like0
Like0