Commit fe9939f7 authored by Constellation's avatar Constellation

canonicalize NaN value in NaN boxing environment

parent 2900b01a
...@@ -134,7 +134,12 @@ mrb_float_value(mrb_float f) ...@@ -134,7 +134,12 @@ mrb_float_value(mrb_float f)
{ {
mrb_value v; mrb_value v;
if (f != f) {
v.ttt = 0x7ff80000;
v.value.i = 0;
} else {
v.f = f; v.f = f;
}
return v; return v;
} }
#endif /* MRB_NAN_BOXING */ #endif /* MRB_NAN_BOXING */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment