/*
 * Document-method: Hash#to_msgpack
 *
 * call-seq:
 *   hash.to_msgpack(out = '') -> String
 *
 * Serializes the Hash into raw bytes.
 * This calls to_msgpack method reflectively for internal keys and values.
 */
static VALUE MessagePack_Hash_to_msgpack(int argc, VALUE *argv, VALUE self)
{
        ARG_BUFFER(out, argc, argv);
        msgpack_pack_map(out, RHASH_SIZE(self));
        rb_hash_foreach(self, MessagePack_Hash_to_msgpack_foreach, out);
        return out;
}