Project

General

Profile

Actions

Bug #19578

closed

abort() shows stack trace when run within rescue clause

Added by Dan0042 (Daniel DeLorme) about 1 year ago. Updated about 1 year ago.

Status:
Rejected
Assignee:
-
Target version:
-
[ruby-core:113112]

Description

I sometimes use the pattern print(str) rescue abort in order to exit without stack trace when the output of a ruby program is interrupted by SIGPIPE, ex: ./printstuff.rb | head

It seems that since ruby 2.7 this results in printing the stack trace. This is not the case when using abort by itself.

Is this intended? I would expect abort to behave much like exit(1), as it always has.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0