summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2019-09-07 22:25:08 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2019-09-07 22:27:30 +0900
commit9d08025b8b0fc9828120d48c61bde9c4ba49ce74 (patch)
tree12642f98ff9f0a9407af5f3dd3e5646d0f83d86b /src
parent8f04d6561f0d8cb0f631d53d435e1522009a0a0e (diff)
downloadmruby-9d08025b8b0fc9828120d48c61bde9c4ba49ce74.tar.gz
mruby-9d08025b8b0fc9828120d48c61bde9c4ba49ce74.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/numeric.c3
1 files changed, 0 insertions, 3 deletions
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;
}