Add assertion we can pack function pointers in `mrb_method_t`.
If this assertion fails, you have to define `MRB_USE_METHOD_T_STRUCT`.
@@ -521,6 +521,9 @@ mrb_define_method_id(mrb_state *mrb, struct RClass *c, mrb_sym mid, mrb_func_t f
int ai = mrb_gc_arena_save(mrb);
MRB_METHOD_FROM_FUNC(m, func);
+#ifndef MRB_USE_METHOD_T_STRUCT
+ mrb_assert(MRB_METHOD_FUNC(m) == func);
+#endif
if (aspec == MRB_ARGS_NONE()) {
MRB_METHOD_NOARG_SET(m);
}
