fetch vs. [] when working with hashes? This question already has an answer here: Benefits of using `Hash#fetch` over `Hash#[]` 3 answers From Ruby Koans about_hashes.rb: Why might you want to use #fetch instead of #[] when accessing hash keys? By default, using #[] will retrieve the hash value if it exists, and return nil if it doesn't exist *. Using #fetch gives you a few options (see the docs ..