ruby-changes:60997
From: Nobuyoshi <ko1@a...>
Date: Mon, 4 May 2020 00:34:07 +0900 (JST)
Subject: [ruby-changes:60997] 41e547e60c (master): Fixed constant initializer
https://git.ruby-lang.org/ruby.git/commit/?id=41e547e60c From 41e547e60cffcaaa2a5a9aeb54df3295b8d88426 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Mon, 4 May 2020 00:27:14 +0900 Subject: Fixed constant initializer An expression using `static const` value seems not considered as `static const` by Visual C. diff --git a/random.c b/random.c index de2767a..dc4ad76 100644 --- a/random.c +++ b/random.c @@ -88,7 +88,7 @@ int_pair_to_real_exclusive(uint32_t a, uint32_t b) https://github.com/ruby/ruby/blob/trunk/random.c#L88 static const int a_shift = DBL_MANT_DIG < 64 ? (64-DBL_MANT_DIG)/2 : 0; static const int b_shift = DBL_MANT_DIG < 64 ? - (64-DBL_MANT_DIG)-a_shift : 0; + (65-DBL_MANT_DIG)/2 : 0; a >>= a_shift; b >>= b_shift; return (a*(double)(1ul<<(32-b_shift))+b)*dbl_reduce_scale; -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/