Created
July 22, 2009 00:30
-
-
Save larrytheliquid/151724 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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