Project

General

Profile

Feature #12338

bypass Exception.new

Added by nobu (Nobuyoshi Nakada) almost 3 years ago. Updated almost 3 years ago.

Status:
Open
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:75302]

Description

Redefinition of class method new is an outdated style, and internal exceptions should not be affected by it.

https://github.com/ruby/ruby/compare/trunk...nobu:feature/exc_new-bypass
https://github.com/ruby/ruby/pull/1331


Related issues

Related to Backport186 - Bug #1886: Strange exception thrown when Exception#new is overridden and returns a non-ExceptionClosed08/05/2009Actions
Related to Ruby trunk - Bug #14229: An exception in eval has strange messageClosedActions

History

#1

Updated by nobu (Nobuyoshi Nakada) almost 3 years ago

  • Related to Bug #1886: Strange exception thrown when Exception#new is overridden and returns a non-Exception added

Updated by nobu (Nobuyoshi Nakada) almost 3 years ago

Currently, exception in eval shows the followings:

$ ruby -e 'eval("raise")'
-e:1:in `eval': (eval):1:in `<main>' (RuntimeError)
    from -e:1:in `eval'
    from -e:1:in `<main>'

I don't see a reason "`eval'" is prepended.

#3

Updated by nobu (Nobuyoshi Nakada) over 1 year ago

  • Related to Bug #14229: An exception in eval has strange message added

Also available in: Atom PDF