Issue #14229 has been updated by nobu (Nobuyoshi Nakada).

Target version set to 2.6

I think I've filed this issue already (and discussed at a developers' meeting), but I can't remember the number.

----------------------------------------
Bug #14229: An exception in eval has strange message
https://bugs.ruby-lang.org/issues/14229#change-68955

* Author: mame (Yusuke Endoh)
* Status: Assigned
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
* Target version: 2.6
* ruby -v: 
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
Is this intentional?  If so, I'm curious what purpose it is for.

    begin
      eval("raise")
    rescue
      p e.message  #=> "(eval):1:in `<main>'"
    end

This leads to progressive backtrace message:

    $ ./miniruby -e 'eval("raise")'
    Traceback (most recent call last):
            2: from -e:1:in `<main>'
            1: from -e:1:in `eval'
    -e:1:in `eval': (eval):1:in `<main>' (RuntimeError)
                    ^^^^^^^^^^^^^^^^^^^^ HIGHLIGHTED



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>