From: "olleicua (Antha Auciello)" Date: 2022-06-14T03:31:14+00:00 Subject: [ruby-core:108889] [Ruby master Feature#18183] make SecureRandom.choose public Issue #18183 has been updated by olleicua (Antha Auciello). > - `Random::Formatter#from_set(set, n = 16)` (or `Random::Formatter#from_set(n = 16, set: ���)`) I like `Random::Formatter#from_set` or `Random::Formatter#from_alphabet` because `from` makes it clear what the purpose of the additional parameter is. `Random::Formatter#alphabet` would seem a little confusing to me as it could suggest that a standard `a-z` alphabet of some sort is being used. ---------------------------------------- Feature #18183: make SecureRandom.choose public https://bugs.ruby-lang.org/issues/18183#change-97967 * Author: olleicua (Antha Auciello) * Status: Rejected * Priority: Normal ---------------------------------------- This issue https://bugs.ruby-lang.org/issues/10849 added `SecureRandom.alphanumeric` and also the private method choose. `choose` was kept private because the method name wasn't the best name to represent the behavior. I think if it was called `random_string` it would be very clear what it does. I also think it should be aliased to choose as well to allow backwards compatibility for people bypassing the private method with `send` (e.g. https://www.thetopsites.net/article/58611103.shtml) I'm planning to put together a pull request for this. Please let me know if there are any complications I'm not considering. -- https://bugs.ruby-lang.org/ Unsubscribe: