September 20th, 2011, 02:54 AM
Join Date: Sep 2011
Time spent in forums: 26 m 51 sec
Reputation Power: 0
Ruby - Recursive stack level too deep
I'm trying to run the following script:
data = nil
children = nil
attr_accessor :children, :data
def initialize(data, children=Array.new)
self.data = data
self.children = children
self.children << child
print self.data.url, "\n"
But the method printtree is running till the stack level is too deep.... this is strange because it should not. So i'm sure I made a type in my ruby script. But i'm pretty new to ruby so obviously i don't see it haha.
Hope you can help me. That would be a blast!