From: Terry Poulin Date: 2007-08-31T10:09:53+09:00 Subject: Re: Why stack overflow with such a small stack? Daniel DeLorme wrote: > Kenneth McDonald wrote: >> I'm getting the following error: >> >> sheet.rb:35:in `values': stack level too deep (SystemStackError) >> from sheet.rb:35:in `values' /* SNIP */ >> from sheet.rb:52:in `to_s' >> from sheet.rb:92 >> >> The output above is given _in full_. Is Ruby truncating the call stack >> in this output? If so, how I can I see a larger snapshot of the stack, >> so I can trace down where the infinite recursion is really happening? If >> not, why am I getting this error? > > Here's one even shorter: > >> def x; x; end; x > SystemStackError: stack level too deep > from (irb):2:in `x' > from (irb):2:in `x' > from (irb):4 > > Pretty smart of ruby to avoid a gazillion lines of identical output IMHO > > Daniel > > It's nice to see a smart little gem in them thar rubies ;-) I remmeber how long it took for a C Program to crash from the number of function calls.... Dang thats a good Ruby. TerryP. -- Email and shopping with the feelgood factor! 55% of income to good causes. http://www.ippimail.com