-
-
Save gabrielg/d259449ff7bedef92c2e 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
gabriel@last:~$ ruby /tmp/test.rb | |
blam!: stack level too deep | |
and the lord wept | |
gabriel@last:~$ cat /tmp/test.rb | |
#!/usr/bin/env ruby | |
var_list = (0...140000).map{ |i| "var_#{i}" }.join(", ") | |
var_list_2 = (0...130000).map{ |i| "var_#{i}" }.join(", ") | |
eval <<-EOCRAZINESS | |
def blam(#{var_list}) | |
puts "and the lord wept" | |
end | |
def blam2(#{var_list_2}) | |
puts "and the lord wept" | |
end | |
EOCRAZINESS | |
begin | |
blam(*(0...140000)) | |
rescue SystemStackError => e | |
puts "blam!: #{e}" | |
end | |
blam2(*(0...130000)) | |
gabriel@last:~$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment