FALSE and STRING should not be converted to float for get_args("f"); close #525

This commit is contained in:
Yukihiro Matsumoto
2012-11-03 01:57:57 +09:00
parent 5987f67a8d
commit 9f0c59e068
+2 -2
View File
@@ -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:
{