def symbolize_hash_keys(hash)
      hash.inject({}) do |new_hash, (key, value)|
        new_hash[(key.to_sym rescue key) || key] = value
        new_hash
      end
      hash
    end
def symbolize_hash_keys(hash)
      hash.inject({}) do |new_hash, (key, value)|
        new_hash[(key.to_sym rescue key) || key] = value
        new_hash
      end
      hash
    end
def symbolize_hash_keys ( hash ) hash . inject ( { } ) do | new_hash , ( key , value ) | new_hash [ ( key . to_sym rescue key ) || key ] = value new_hash end hash end
note that returning hash without symbolizing anything
 does not cause this to fail
note that returning hash without symbolizing anything does not cause this to fail