summaryrefslogtreecommitdiff
path: root/include/ruby/assert.h
diff options
context:
space:
mode:
authornagachika <nagachika@ruby-lang.org>2025-04-07 21:19:10 +0900
committernagachika <nagachika@ruby-lang.org>2025-04-07 21:19:10 +0900
commita67e9e41846cdadad9bb2d9e9d10223c52253898 (patch)
tree15b5f7d6f42492ca5ea34fc2abc3ea353f696ef7 /include/ruby/assert.h
parent5640fea8aada2380145375a7f9eac2b979fe1258 (diff)
merge revision(s) 3a7b9ca93b91dcc086b9ac8b9957e59268f9493b: [Backport #21217]
Fix `Integer.sqrt` to never exceed actual value `Integer.sqrt` uses `sqrt(3)` from libm for small values. This method must return a value less than or equal to the actual integer square root, but libm's sqrt does not always guarantee that. This change corrects that by decrementing the result if necessary. Fixes [Bug #21217]
Diffstat (limited to 'include/ruby/assert.h')
0 files changed, 0 insertions, 0 deletions