How to increase stack size for a ruby app. Recursive app getting: Stack level too deep (SystemStackError)

前端 未结 7 1809
感情败类
感情败类 2020-11-30 02:53

Posting a stack overflow question on stackoverflow.com, how amusing :-)

I\'m running some recursive Ruby code and I get the: \"Stack level too deep (SystemStac

相关标签:
7条回答
  • 2020-11-30 03:51

    This question and its answers appear to date back to Ruby 1.8.x, which used the C stack. Ruby 1.9.x and later use a VM that has its own stack. In Ruby 2.0.0 and later, the size of the VM stack can be controlled via the RUBY_THREAD_VM_STACK_SIZE environment variable.

    0 讨论(0)
提交回复
热议问题