Skip to content

Instantly share code, notes, and snippets.

@mickey
Created November 18, 2009 20:17
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 mickey/238204 to your computer and use it in GitHub Desktop.
Save mickey/238204 to your computer and use it in GitHub Desktop.
>> h = Hash.new {raise IndexError }
=> {}
>> h[:bla]
IndexError: IndexError
from (irb):39
from (irb):40:in `call'
from (irb):40:in `default'
from (irb):40:in `[]'
from (irb):40
>> h = {}
=> {}
>> h.fetch(:blah)
IndexError: key not found
from (irb):42:in `fetch'
from (irb):42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment