[MacRuby] #310: eval throws an exception with backtrace nil
#310: eval throws an exception with backtrace nil ------------------------+--------------------------------------------------- Reporter: dev@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: eval exception backtrace ------------------------+--------------------------------------------------- {{{ $ macruby -e 'begin; eval("1a"); rescue Exception => exc; end; p exc.backtrace' }}} produces {{{ nil }}} This is not allowed and causes IRB to crash after evaluating "1a" (without parenthesis) When adding this to irb.rb:158 {{{ exc.set_backtrace([]) if exc.backtrace.nil? }}} IRB don't crashes -- Ticket URL: <http://www.macruby.org/trac/ticket/310> MacRuby <http://macruby.org/>
#310: eval throws an exception with backtrace nil ------------------------+--------------------------------------------------- Reporter: dev@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: eval exception backtrace ------------------------+--------------------------------------------------- Comment(by dev@…): Can anybody add this failing test to "test_vm/eval.rb"? {{{ assert 'true', 'begin; eval("1 = 1"); rescue Exception => e; end; p e.backtrace.kind_of? Array' }}} Thanks! -- Ticket URL: <http://www.macruby.org/trac/ticket/310#comment:1> MacRuby <http://macruby.org/>
#310: eval throws an exception with backtrace nil ------------------------+--------------------------------------------------- Reporter: dev@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: eval exception backtrace ------------------------+--------------------------------------------------- Comment(by eloy.de.enige@…): Added in r2451, thanks! Btw: In case you use git, I prefer a git format-patch diff :) -- Ticket URL: <http://www.macruby.org/trac/ticket/310#comment:2> MacRuby <http://macruby.org/>
#310: eval throws an exception with backtrace nil --------------------------------------+------------------------------------- Reporter: dev@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: major | Milestone: MacRuby 0.5 Component: MacRuby | Resolution: fixed Keywords: eval exception backtrace | --------------------------------------+------------------------------------- Changes (by lsansonetti@…): * status: new => closed * resolution: => fixed Comment: Thanks for the report, it should be fixed in r2565. -- Ticket URL: <http://www.macruby.org/trac/ticket/310#comment:3> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby