ruby-changes:44464
From: nobu <ko1@a...>
Date: Tue, 1 Nov 2016 21:35:36 +0900 (JST)
Subject: [ruby-changes:44464] nobu:r56537 (trunk): numeric.c: adjust indent [ci skip]
nobu 2016-11-01 21:35:31 +0900 (Tue, 01 Nov 2016) New Revision: 56537 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56537 Log: numeric.c: adjust indent [ci skip] * numeric.c (rb_num2ulong_internal): adjust indent. Modified files: trunk/numeric.c Index: numeric.c =================================================================== --- numeric.c (revision 56536) +++ numeric.c (revision 56537) @@ -2666,18 +2666,17 @@ rb_num2ulong_internal(VALUE val, int *wr https://github.com/ruby/ruby/blob/trunk/numeric.c#L2666 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)) { { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/