diff options
author | Nobuyoshi Nakada <[email protected]> | 2024-05-18 16:14:44 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2024-12-16 20:54:40 +0900 |
commit | 946c823ddbd2f9bd9429d7d1b229a5ba773e540f (patch) | |
tree | 331d1089ad7c4370821e68a55236ac33c61c3462 /lib/random/formatter.rb | |
parent | 784bd9c42ebc58c5ba6f40d9600b9591db81c8d8 (diff) |
Freeze `Random::Formatter::ALPHANUMERIC` and its elements
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/12356
Diffstat (limited to 'lib/random/formatter.rb')
-rw-r--r-- | lib/random/formatter.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/random/formatter.rb b/lib/random/formatter.rb index 2b5cf718ad..4ecd6ad027 100644 --- a/lib/random/formatter.rb +++ b/lib/random/formatter.rb @@ -340,7 +340,7 @@ module Random::Formatter end # The default character list for #alphanumeric. - ALPHANUMERIC = [*'A'..'Z', *'a'..'z', *'0'..'9'] + ALPHANUMERIC = [*'A'..'Z', *'a'..'z', *'0'..'9'].map(&:freeze).freeze # Generate a random alphanumeric string. # |