Project

General

Profile

Actions

Bug #12811

closed

SyntaxError does not have a backtrace in 2.3+

Added by ametcalf (Andrew Metcalf) over 7 years ago. Updated over 7 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]
[ruby-core:77491]

Description

SyntaxError's do not have a backtrace in Ruby 2.3.0, 2.3.1 and 2.3.0-preview1. To reproduce, place both of the attached scripts in the same directory and run ruby repro.rb. In Ruby 2.3+ no backtrace is printed. In Ruby 2.2.4p230, a normal backtrace is printed.


Files

invalid.rb (2 Bytes) invalid.rb ametcalf (Andrew Metcalf), 10/05/2016 09:02 PM
repro.rb (85 Bytes) repro.rb ametcalf (Andrew Metcalf), 10/05/2016 09:02 PM
Actions #1

Updated by nobu (Nobuyoshi Nakada) over 7 years ago

  • Status changed from Open to Closed

Applied in changeset r56363.


load.c: setup syntax error backtrace

  • load.c (rb_require_safe): SyntaxError created by the parser just
    has the mesage and needs to set up the backtrace.
    [ruby-core:77491] [Bug #12811]

Updated by nagachika (Tomoyuki Chikanaga) over 7 years ago

  • Backport changed from 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN to 2.1: DONTNEED, 2.2: DONTNEED, 2.3: REQUIRED

Updated by nagachika (Tomoyuki Chikanaga) over 7 years ago

  • Backport changed from 2.1: DONTNEED, 2.2: DONTNEED, 2.3: REQUIRED to 2.1: DONTNEED, 2.2: DONTNEED, 2.3: DONE

ruby_2_3 r56439 merged revision(s) 56363,56365.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0