From: "B. K. Oxley (binkley)" Date: 2005-03-18T00:44:01+09:00 Subject: Re: Maximum stack depth Glenn Parker wrote: > It would be useful to have a Ruby command-line option to specify a > larger limit on stack depth. I can't find any obvious way, short of > manipulating the source, to do this. Does Ruby not do tail recursion optimization? That would remove any limit to the stack depth for functions such as Ackerman. This is what Smalltalk (VisualWorks) says about it: http://wiki.cs.uiuc.edu/VisualWorks/Tail+Recursion And the C2 wiki talks about it as well as some of the drawbacks: http://c2.com/cgi/wiki?TailCallOptimization Cheers, --binkley