gregtour / duck-lang

The Duck Programming Language
http://www.ducklang.org
109 stars 13 forks source link

Printing recursive data-structures leads to segmentation fault #19

Closed gregtour closed 9 years ago

gregtour commented 9 years ago

Example:

x = []
x.x = x
duck.print(x)
gregtour commented 9 years ago

Fixed by using a hash table of visited dynamic objects when calling duck.print or duck.println. A similar solution should be able to be used for implicit to-string.