From 22e41718a49b07b093e25e2d211a988c4a9fd6cc Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 1 Nov 2016 12:35:31 +0000 Subject: [PATCH] numeric.c: adjust indent [ci skip] * numeric.c (rb_num2ulong_internal): adjust indent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- numeric.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/numeric.c b/numeric.c index f894a3f594..21e8eeeb8e 100644 --- a/numeric.c +++ b/numeric.c @@ -2666,18 +2666,17 @@ rb_num2ulong_internal(VALUE val, int *wrap_p) return (unsigned long)l; } else if (RB_TYPE_P(val, T_FLOAT)) { - if (RFLOAT_VALUE(val) < ULONG_MAX_PLUS_ONE - && LONG_MIN_MINUS_ONE_IS_LESS_THAN(RFLOAT_VALUE(val))) { - double d = RFLOAT_VALUE(val); - if (wrap_p) - *wrap_p = d <= -1.0; /* NUM2ULONG(v) uses v.to_int conceptually. */ - if (0 <= d) - return (unsigned long)d; - return (unsigned long)(long)d; - } - else { - FLOAT_OUT_OF_RANGE(val, "integer"); - } + double d = RFLOAT_VALUE(val); + if (d < ULONG_MAX_PLUS_ONE && LONG_MIN_MINUS_ONE_IS_LESS_THAN(d)) { + if (wrap_p) + *wrap_p = d <= -1.0; /* NUM2ULONG(v) uses v.to_int conceptually. */ + if (0 <= d) + return (unsigned long)d; + return (unsigned long)(long)d; + } + else { + FLOAT_OUT_OF_RANGE(val, "integer"); + } } else if (RB_TYPE_P(val, T_BIGNUM)) { {