From 9d08025b8b0fc9828120d48c61bde9c4ba49ce74 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Sat, 7 Sep 2019 22:25:08 +0900 Subject: Revert part of #4225 Since in mruby, Integer and Float interchange frequently (mostly on overflow), so adding explicit `.0` can cause problems sometimes. For example: https://github.com/mattn/mruby-json/pull/40 https://github.com/pepabo/mruby-msd/pull/13 https://github.com/mattn/mruby-json/pull/42 --- src/numeric.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/numeric.c') diff --git a/src/numeric.c b/src/numeric.c index 18b8ff461..638f75fd8 100644 --- a/src/numeric.c +++ b/src/numeric.c @@ -246,9 +246,6 @@ flo_to_s(mrb_state *mrb, mrb_value flt) str = mrb_float_to_str(mrb, flt, fmt); goto insert_dot_zero; } - else { - mrb_str_cat(mrb, str, ".0", 2); - } return str; } -- cgit v1.2.3