From: Aldric Giacomoni <"aldric[remove]"@...> Date: 2008-12-17T06:39:20+09:00 Subject: Re: Ruby 1.8.6 - normal behavior ? Tom Link wrote: >> #Apparently, the simple fact of checking this keeps Ruby from raising >> #a NoMethodError when those entries don't exist >> > > Entry is a hash I presume? > > a = {:a => 1, :b => 2} > > a[:a] > => 1 > a[:x] > nil > Entry is a very big hash and I use those values later - if I don't run those three lines, I'll get a crash, but if I run those three lines, using those values is fine even if they don't exist... Oh -- is that because it -creates- the key-value pair when I look at it ?