Skip to content

Instantly share code, notes, and snippets.

@larrytheliquid
Created July 22, 2009 00:30
Show Gist options
  • Save larrytheliquid/151724 to your computer and use it in GitHub Desktop.
Save larrytheliquid/151724 to your computer and use it in GitHub Desktop.
# 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