[Bug:trunk] backtrace of SystemStackError disappeared

e$B1sF#$G$9!#e(B

e$B$J$<$+e(B SystemStackError
e$B$N;~$N%P%C%/%H%l!<%9$,=P$J$/$J$C$F$$$k$h$&$G$9!#e(B

$ ./ruby -ve ‘def foo; bar; end; def bar; foo; end; def baz; foo; end;
baz’
ruby 1.9.2dev (2010-03-26 trunk 27063) [i686-linux]
-e:1: stack level too deep (SystemStackError)

$ ruby-1.9.1-p378 -ve ‘def foo; bar; end; def bar; foo; end; def baz;
foo; end; baz’
ruby 1.9.1p378 (2010-01-10 revision 26273) [i686-linux]
-e:1:in foo': stack level too deep (SystemStackError) from -e:1:inbar’
from -e:1:in foo' from -e:1:inbar’
from -e:1:in foo' from -e:1:inbar’
from -e:1:in foo' from -e:1:inbar’
from -e:1:in foo' ... 8720 levels... from -e:1:inbar’
from -e:1:in foo' from -e:1:inbaz’
from -e:1:in `’

e$B1sF#$G$9!#e(B

2010e$BG/e(B3e$B7ne(B29e$BF|e(B0:00 Yusuke ENDOH [email protected]:

e$B$J$<$+e(B SystemStackError e$B$N;~$N%P%C%/%H%l!<%9$,=P$J$/$J$C$F$$$k$h$&$G$9!#e(B

git bisect e$B@h@8$K$h$k$He(B r25680 e$B$,860x$N$h$&$G$9!#e(B

e$B%A%1%C%He(B #3033 e$B$,99?7$5$l$^$7$?!#e(B (by Yusuke E.)

e$B%9%F!<%?%9e(B Opene$B$+$ie(BRejectede$B$KJQ99e(B
Target version 1.9.2e$B$K%;%C%He(B
ruby -v -e$B$K%;%C%He(B

e$B1sF#$G$9!#e(B

r25680
e$B$N%3%%C%H$r$A$c$s$H$$k$H!“$^$D$b$H$5$s$,0U?^E*$KJQ99$7$?$h$&e(B
e$B$J$N$G!”%P%0$G$O$J$$$h$&$G$9!#e(Brejected e$B$H$7$^$9!#e(B

e$B!Ve(Bmatz

e$B$r@bF@$9$kJ}K!!W$N!V>JN,$N0U?^$rB:=E$7$F$$$k!W$,>C$($A$c$C$?e(B

http://www.a-k-r.org/pub/howto-persuade-matz-rubykaigi2008.pdf


Yusuke E. [email protected]

http://redmine.ruby-lang.org/issues/show/3033

e$B%A%1%C%He(B #3033 e$B$,99?7$5$l$^$7$?!#e(B (by Evgeniy D.)

I think that returning String instead of an Array as Exception#backtrace
here ruby/eval.c at trunk · shyouhei/ruby · GitHub
is breaking other code expectation about backtrace being enumerable.

The real life example is RSpec:

/usr/local/rvm/gems/ruby-1.9.2-head/gems/rspec-core-2.0.0.beta.7/lib/rspec/core/formatters/base_formatter.rb:127:in
read_failed_line': undefined method detect’ for
“faster_open_struct.rb:0”:String (NoMethodError)

(link to the code
rspec-core/lib/rspec/core/formatters/base_formatter.rb at master · rspec/rspec-core · GitHub
)

http://redmine.ruby-lang.org/issues/show/3033