Fix `mrb_vformat("%f")` with `MRB_USE_FLOAT`
It potentially not work when `mrb_float` is `float` because `float` variable
in variable length arguments is promoted to `double`.
Also I fixed build with `MRB_WITHOUT_FLOAT`.
MODIFY
mrbgems/mruby-test/vformat.c
mrbgems/mruby-test/vformat.c
#include <mruby/data.h>
#include <mruby/string.h>
+#ifdef MRB_WITHOUT_FLOAT
+typedef mrb_int mrb_float;
+#define mrb_float(o) mrb_fixnum(o)
+#endif
+
#define NATIVE_TYPES \
char c; \
int d; \

MODIFY
src/error.c
src/error.c
@@ -328,9 +328,11 @@ mrb_vformat(mrb_state *mrb, const char *format, va_list ap)
i = *p == 'd' ? (mrb_int)va_arg(ap, int) : va_arg(ap, mrb_int);
obj = mrb_fixnum_value(i);
goto L_cat_obj;
+#ifndef MRB_WITHOUT_FLOAT
case 'f':
- obj = mrb_float_value(mrb, va_arg(ap, mrb_float));
+ obj = mrb_float_value(mrb, (mrb_float)va_arg(ap, double));
goto L_cat_obj;
+#endif
case 'l':
chars = va_arg(ap, char*);
len = va_arg(ap, mrb_int);

Fix `mrb_vformat("%f")` with `MRB_USE_FLOAT`

It potentially not work when `mrb_float` is `float` because `float` variable
in variable length arguments is promoted to `double`.

Also I fixed build with `MRB_WITHOUT_FLOAT`.