summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorS-H-GAMELINKS <gamelinks007@gmail.com>2021-09-11 09:56:59 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-09-12 11:16:31 +0900
commit83a5e2bb5c1b9f24b70dc30c50b5deb4d7232119 (patch)
tree4b1746f42c5806022b299ecef9f3f6d833fcf442 /compile.c
parentaf5826a25e24ba7179038f99362aa918d48bd8be (diff)
Using RB_FLOAT_TYPE_P macro
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4821
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/compile.c b/compile.c
index 0569601317..268bd8b6a6 100644
--- a/compile.c
+++ b/compile.c
@@ -4551,7 +4551,7 @@ rb_node_case_when_optimizable_literal(const NODE *const node)
case NODE_LIT: {
VALUE v = node->nd_lit;
double ival;
- if (RB_TYPE_P(v, T_FLOAT) &&
+ if (RB_FLOAT_TYPE_P(v) &&
modf(RFLOAT_VALUE(v), &ival) == 0.0) {
return FIXABLE(ival) ? LONG2FIX((long)ival) : rb_dbl2big(ival);
}
@@ -12407,7 +12407,7 @@ ibf_dump_object_object(struct ibf_dump *dump, VALUE obj)
if (SPECIAL_CONST_P(obj) &&
! (SYMBOL_P(obj) ||
- RB_TYPE_P(obj, T_FLOAT))) {
+ RB_FLOAT_TYPE_P(obj))) {
obj_header.special_const = TRUE;
obj_header.frozen = TRUE;
obj_header.internal = TRUE;