From a020e3490a1487d351868d3283e7881f03b3d7d2 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 3 Jul 2025 15:46:57 +0900 Subject: [PATCH] [DOC] Deleted the description about 2.2 and earlier --- doc/security.rdoc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/doc/security.rdoc b/doc/security.rdoc index fb0e4a52da..b7153ff0e9 100644 --- a/doc/security.rdoc +++ b/doc/security.rdoc @@ -53,9 +53,8 @@ method, variable and constant names. The reason for this is that symbols are simply integers with names attached to them, so they are faster to look up in hashtables. -Starting in version 2.2, most symbols can be garbage collected; these are -called _mortal_ symbols. Most symbols you create (e.g. by calling -+to_sym+) are mortal. +Most symbols can be garbage collected; these are called _mortal_ +symbols. Most symbols you create (e.g. by calling +to_sym+) are mortal. _Immortal_ symbols on the other hand will never be garbage collected. They are created when modifying code: @@ -64,8 +63,6 @@ They are created when modifying code: * creating a variable or constant (e.g. with +const_set+) C extensions that have not been updated and are still calling +SYM2ID+ will create immortal symbols. -Bugs in 2.2.0: +send+ and +__send__+ also created immortal symbols, -and calling methods with keyword arguments could also create some. Don't create immortal symbols from user inputs. Otherwise, this would allow a user to mount a denial of service attack against your application by