Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# tail.rb
# JAVA_OPTS="-Djruby.tailcall.enabled=true" jruby tail.rb --1.9
# Error: Your application used more stack memory than the safety cap of 1024k.
# Specify -J-Xss####k to increase it (#### = cap size in KB).
# Specify -w for full StackOverflowError stack trace
def fact(n, acc)
if n == 0
acc
else
fact n-1, n*acc
end
end
p fact(25000, 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.