Changes all keys in the top level of the hash to symbols.  Does not affect nested hashes inside this one.
167719
def symbolize_keys(hash)
      hash.keys.each do |key|
        hash[(key.to_sym rescue key) || key] = hash.delete(key)
      end
      hash
    end
721466
def buffer_key(key, opts)
      # covert keys to strings, as sorting a Hash with Symbol keys fails on
      # Ruby 1.8.x.
      opts = opts.inject({}) do |result, (k, v)|
        result[k.to_s] = v
        result
      end
      "#{key.to_s}:#{opts.sort.flatten.join(':')}"
    end
794874
def rename_key(d: Dict[str, Any], old: str, new: str) -> None:
    
    d[new] = d.pop(old)
1108389
def reset(self, dim):
        
        self.dim = dim
        # Reset all child hashes
        for child_hash in self.child_hashes:
            child_hash['hash'].reset(dim)
            child_hash['bucket_keys'] = {}
1034869
def symbolize_keys(hash)
      hash.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
    end
1135188
def to_dot_attributes(hash)
      # TODO: fix uncompatible key names
      # TODO: some values must be encoded (backquoting and the like)
      buffer = ""
      hash.each_pair do |k,v|
        buffer << " " unless buffer.empty?
        v = case v
          when Array
            if v.all?{|elm| Array===elm and elm.length==2 and elm.all?{|subelm| Numeric===subelm}}
              v.inject('') {|memo, elm| "#{memo} #{elm.join(',')}"}.strip
            else
              v.join(', ')
            end
          else
            v.to_s
        end
        buffer << "#{k}=\"#{v}\""
      end
      buffer
    end
520228
def to_s
      hash = {}
      @hooks_map.each_pair do |hook_event, nested_hash|
        hash[hook_event] = {}
        nested_hash.each_pair do |name, callbacks|
          hash[hook_event][name] = callbacks
        end
      end
      hash.to_s
    end
145443
def reset_key
      properties.key.zip(key) do |property, value|
        property.set!(self, value)
      end
    end
1059347
def normalize_keys(hash)
        hash.inject({}) do |options, (key, value)|
          options[(underscore(key) rescue key) || key] = normalize_value(value)
          options
        end
      end
198116
def to_hash_with_values
      keys = table_header_keys
      values = self
      @hash_with_values = {}
      keys.each_with_index {|k,i| v=values[i]; v=v.value if v; @hash_with_values[k]=v}
      return @hash_with_values
    end
509546
def normalize_hash(hash)
      new_hash = {}

      hash.each do |key,value|
        new_hash[key.to_sym] = normalize(value)
      end

      return new_hash
    end
28145
def camelize_keys!(hash)
      hash.keys.each do |key|
        hash[key.to_s.camelize(:lower).to_sym] = hash.delete key
      end if hash.is_a? Hash
      hash
    end
1302457
def symbolize_keys_deep(hash)
      return hash unless hash.is_a?(Hash)

      Hash[hash.map do |key, value|
        # if value is array, loop each element and recursively symbolize keys
        if value.is_a? Array
          value = value.map { |element| symbolize_keys_deep(element) }
          # if value is hash, recursively symbolize keys
        elsif value.is_a? Hash
          value = symbolize_keys_deep(value)
        end

        [symbolize_key(key), value]
      end]
    end
1333384
public function mapSymbols()
    {
        foreach ($this->input as $key => $input) {
            foreach ($this->symbols as $skey => $svalue) {
                if (substr($key, 0, 1) == $svalue) {

                    $keyWithoutSymbol = str_replace($svalue, '', $key);

                    if (is_string($input)) {
                        $this->setElementBy($skey, $keyWithoutSymbol, $input);
                    }
                    if (is_array($input)) {
                        $this->setElementBy($skey, $keyWithoutSymbol, $input);
                    }
                    if (is_object($input)) {
                        $this->setElementBy($skey, $keyWithoutSymbol, $input);
                    }
                }
            }
        }
    }
992894
def deep_symbolize_keys
      return each_with_object({}) { |memo, (k, v)| memo[k.to_sym] = v.deep_symbolize_keys } if self.is_a?(Hash)
      return each_with_object([]) { |memo, v| memo << v.deep_symbolize_keys } if self.is_a?(Array)
      self
    end
1245850
def rename(self, old_key, new_key):
        
        return lib.zhash_rename(self._as_parameter_, old_key, new_key)
1346468
def add_to_hash(all_translations, lang)
      levels = self.name.split('.')
      add_to_hash_rec(all_translations, levels, lang.to_s)
    end