summaryrefslogtreecommitdiff
path: root/NEWS
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-05 09:49:39 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-05 09:49:39 +0000
commitdfe91fcd08e7e255b5cb1b306e53bea1ddb54e5f (patch)
treed209f0b546e45cb8d8fa7fc2bbbb5044e53e2c8f /NEWS
parent76977611dd68e384fdce8c546efda5e1931e67a6 (diff)
numeric.c: round to nearest even
* numeric.c (flo_round, int_round): support round-to-nearest-even semantics of IEEE 754 to match sprintf behavior, and add `half:` optional keyword argument for the old behavior. [ruby-core:76273] [Bug #12548] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'NEWS')
-rw-r--r--NEWS11
1 files changed, 11 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index d9f6c6eedb..3f4c64b8b1 100644
--- a/NEWS
+++ b/NEWS
@@ -69,6 +69,9 @@ with all sufficient information, see the ChangeLog file or Redmine
* Float#ceil, Float#floor, and Float#truncate now take an optional
digits, as well as Float#round. [Feature #12245]
+ * Float#round now takes an optional keyword argument, half option, and
+ the default behavior is round-to-nearest-even now. [Bug #12548]
+
* Hash
* Hash#transform_values and Hash#transform_values! [Feature #12512]
@@ -83,6 +86,9 @@ with all sufficient information, see the ChangeLog file or Redmine
* Integer#digits for extracting columns of place-value notation [Feature #12447]
+ * Int#round now takes an optional keyword argument, half option, and the
+ default behavior is round-to-nearest-even now. [Bug #12548]
+
* IO
* IO#gets, IO#readline, IO#each_line, IO#readlines, IO#foreach now takes
@@ -112,6 +118,11 @@ with all sufficient information, see the ChangeLog file or Redmine
* Support CLOCK_MONOTONIC_RAW_APPROX, CLOCK_UPTIME_RAW, and
CLOCK_UPTIME_RAW_APPROX which are introduced by macOS 10.12.
+* Rational
+
+ * Rational#round now takes an optional keyword argument, half option, and
+ the default behavior is round-to-nearest-even now. [Bug #12548]
+
* Regexp
* Regexp#match? [Feature #8110]