mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
FALSE and STRING should not be converted to float for get_args("f"); close #525
This commit is contained in:
+2
-2
@@ -503,8 +503,8 @@ mrb_get_args(mrb_state *mrb, const char *format, ...)
|
||||
case MRB_TT_FIXNUM:
|
||||
*p = (mrb_float)mrb_fixnum(*sp);
|
||||
break;
|
||||
case MRB_TT_FALSE:
|
||||
*p = 0.0;
|
||||
case MRB_TT_STRING:
|
||||
mrb_raise(mrb, E_TYPE_ERROR, "String can't be coerced into Float");
|
||||
break;
|
||||
default:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user