I was sent the following by Philippe de Rochambeau, but not having a
Mac I can't confirm it:
I would like to report a bug report for Ruby 1.6.6 on darwin (MacOSX
10.1.2).
The following program makes Ruby crash whenever you use the number
400.
# Save this as fact.rb
def fact(n)
if n == 0
1
else
n * fact(n-1)
end
end
print fact(ARGV[0].to_i), "\n"
For instance, ruby fact.rb 40 works but ruby fact.rb 400 crashes Ruby.