From: gabriele renzi Date: 2004-09-14T19:04:53+09:00 Subject: Re: Catching undefined global variable errors George Moschovitis ha scritto: > I expected that the interpreter > would raise an Exception (undefined global or something) for > this code. well, the variable is defined, just defined badly :) for what relates to hashes, You can use an hash like this: >> a=Hash.new { raise 'no such key' } => {} >> a['key'] RuntimeError: no such key from (irb):1 from (irb):1:in `call' from (irb):2:in `default' from (irb):2:in `[]' from (irb):2 so that the error does not silently goes on..