class Hash
  def symbolize_keys!
    keys.each do |key|
      self[(key.to_sym rescue key)] = delete(key) if key.respond_to?(:to_sym) && !key.is_a?(Fixnum)
    end
    self
  end
end

class Hash
  def symbolize_keys!
    keys.each do |key|
      self[key.to_sym] = delete(key) if key.respond_to?(:to_sym)
    end
    self
  end
end

Remove test on Fixnum since it has been removed from Ruby 2.4
Remove test on Fixnum since it has been removed from Ruby 2.4
