def map_vals(hash)
      # We don't delegate to map_hash for performance here
      # because map_hash does more than is necessary.
      rv = hash.class.new
      hash = hash.as_stored if hash.is_a?(NormalizedMap)
      hash.each do |k, v|
        rv[k] = yield(v)
      end
      rv
    end
def map_vals(hash)
      # We don't delegate to map_hash for performance here
      # because map_hash does more than is necessary.
      rv = hash.class.new
      hash = hash.as_stored if hash.is_a?(NormalizedMap)
      hash.each do |k, v|
        rv[k] = yield(v)
      end
      rv
    end
Maps the values in a hash according to a block.

 @example
   map_values({:foo => "bar", :baz => "bang"}) {|v| v.to_sym}
     #=> {:foo => :bar, :baz => :bang}
 @param hash [Hash] The hash to map
 @yield [value] A block in which the values are transformed
 @yieldparam value [Object] The value that should be mapped
 @yieldreturn [Object] The new value for the value
 @return [Hash] The mapped hash
 @see #map_keys
 @see #map_hash