On Dec 18, 2005, at 9:57 AM, jwesley wrote:
> I found that ~1300 is the maximum depth of the stack on my machine....
> So I can't use recursion to iterate over more than ~1300 items.

I hope people do realize that they can change the
maximum size of the stack allocated to their ruby process.  For
example on Mac OS X using bash:

$ ulimit -s
8192
$ ruby -e '@i = 0; def foo; @i += 1; foo; end; begin; foo; rescue;  
puts @i; end'
1204
$ ulimit -s 16384
$ ruby -e '@i = 0; def foo; @i += 1; foo; end; begin; foo; rescue;  
puts @i; end'
2484


The ulimit command is built-in to the shell so if you are looking for
ways to change the maximum size of the stack for your processes, look
for ulimit or limit in your shell documentation.

I don't know enough about Windows to offer any hints for that  
environment.

Gary Wright

`