summaryrefslogtreecommitdiffhomepage
path: root/src/class.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2017-05-26 09:54:10 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2017-05-26 09:54:10 +0900
commit83fc915213b23b798ea1afef55fddc0836207a83 (patch)
tree88509b29e278c185308ea676fa465ac4dbe97425 /src/class.c
parent3c312782368e2854c75c56d2008a5cbd78b70dfa (diff)
downloadmruby-83fc915213b23b798ea1afef55fddc0836207a83.tar.gz
mruby-83fc915213b23b798ea1afef55fddc0836207a83.zip
Add new range check macro FIXABLE_FLOAT(); ref #3652
When MRB_INT64, valid value range of mrb_int is bigger than double, which only has 53 bits significant precision.
Diffstat (limited to 'src/class.c')
-rw-r--r--src/class.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/class.c b/src/class.c
index 4349e7b49..b0d7c8aa0 100644
--- a/src/class.c
+++ b/src/class.c
@@ -800,7 +800,7 @@ mrb_get_args(mrb_state *mrb, const char *format, ...)
{
mrb_float f = mrb_float(ARGV[arg_i]);
- if (!FIXABLE(f)) {
+ if (!FIXABLE_FLOAT(f)) {
mrb_raise(mrb, E_RANGE_ERROR, "float too big for int");
}
*p = (mrb_int)f;