Skip to content

Instantly share code, notes, and snippets.

@gabrielg
Created December 7, 2011 03:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gabrielg/5037bf83d28c2c119c44 to your computer and use it in GitHub Desktop.
Save gabrielg/5037bf83d28c2c119c44 to your computer and use it in GitHub Desktop.
gabriel@last:~$ ruby -v
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin11.2.0]
gabriel@last:~$ ruby /tmp/blam.rb
blam!: stack level too deep
130000
gabriel@last:~$ cat /tmp/blam.rb
#!/usr/bin/env ruby
def blam(*args); puts args.size; end
begin
blam(*(0...140000))
rescue SystemStackError => e
puts "blam!: #{e}"
end
blam(*(0...130000))
gabriel@last:~$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment