summaryrefslogtreecommitdiff
path: root/range.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 /range.c
parentaf5826a25e24ba7179038f99362aa918d48bd8be (diff)
Using RB_FLOAT_TYPE_P macro
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4821
Diffstat (limited to 'range.c')
-rw-r--r--range.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/range.c b/range.c
index 7d08a49eee7..16d443a0fbc 100644
--- a/range.c
+++ b/range.c
@@ -725,7 +725,7 @@ range_bsearch(VALUE range)
BSEARCH(INT2FIX);
}
#if SIZEOF_DOUBLE == 8 && defined(HAVE_INT64_T)
- else if (RB_TYPE_P(beg, T_FLOAT) || RB_TYPE_P(end, T_FLOAT)) {
+ else if (RB_FLOAT_TYPE_P(beg) || RB_FLOAT_TYPE_P(end)) {
int64_t low = double_as_int64(NIL_P(beg) ? -HUGE_VAL : RFLOAT_VALUE(rb_Float(beg)));
int64_t high = double_as_int64(NIL_P(end) ? HUGE_VAL : RFLOAT_VALUE(rb_Float(end)));
int64_t mid, org_high;