Ruby 1.8 throws Index error, vs KeyError. Ruby 1.9 & 2.0 KeyError inherits from IndexError