summaryrefslogtreecommitdiff
path: root/NEWS
diff options
context:
space:
mode:
authorJean Boussier <jean.boussier@gmail.com>2019-09-26 17:27:47 +0200
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-09-27 13:52:33 +0900
commiteff15a269fdc37d2b09cf1dfe8c1b1bf6e377a32 (patch)
tree893d0292f67673e2425727e2ecd398a89d7043c9 /NEWS
parent2082a26dc75da7cb76150b51cd5b8f7636ad0fa2 (diff)
[EXPERIMENTAL] Make NilClass#to_s, TrueClass#to_s and FalseClass#to_s return a frozen String
* Always the same frozen String for each of these values. * Avoids extra allocations whenever calling these 3 methods. * See [Feature #16150]
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2492
Diffstat (limited to 'NEWS')
-rw-r--r--NEWS8
1 files changed, 8 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 1ef70fcb50..2f8b954c57 100644
--- a/NEWS
+++ b/NEWS
@@ -163,6 +163,14 @@ Integer::
0b01001100[2...6] #=> 0b0011
^^^^
+NilClass / TrueClass / FalseClass::
+
+ Modified method::
+
+ * NilClass#to_s, TrueClass#to_s and FalseClass#to_s now always returns a
+ frozen String. The returned String is always the same for each of these
+ values. This change is experimental. [Feature #16150]
+
Module::
New method::