[#100689] [Ruby master Feature#17303] Make webrick to bundled gems or remove from stdlib — hsbt@...
Issue #17303 has been reported by hsbt (Hiroshi SHIBATA).
11 messages
2020/11/02
[#100852] [Ruby master Feature#17326] Add Kernel#must! to the standard library — zimmerman.jake@...
Issue #17326 has been reported by jez (Jake Zimmerman).
24 messages
2020/11/14
[#100930] [Ruby master Feature#17333] Enumerable#many? — masafumi.o1988@...
Issue #17333 has been reported by okuramasafumi (Masafumi OKURA).
10 messages
2020/11/18
[#101071] [Ruby master Feature#17342] Hash#fetch_set — hunter_spawn@...
Issue #17342 has been reported by MaxLap (Maxime Lapointe).
26 messages
2020/11/25
[ruby-core:100814] [Ruby master Misc#17319] Rename Random::urandom to os_random and document random data sources
From:
zofrex@...
Date:
2020-11-12 08:40:24 UTC
List:
ruby-core #100814
Issue #17319 has been updated by zofrex (James Sanderson). I hear what you're saying about communicating that it is not coming from `/dev/random`. It's hard to communicate all of that in a method name, because it will be a different source on different OSes or OS versions. "If we rename the method to os_random, that loses information about the randomness source" Only a very small amount of information, I think, because this method almost never uses `/dev/urandom` in practice. `getrandom()` was added to Linux in 3.17, in 2014, so very few people will be falling back on `/dev/urandom`. I am not attached to to the name `os_random`, it was just the best I could come up with at the time. Perhaps more could be communicated about the source with something like `os_best_random`, to imply Ruby is using the best available source of random data the OS provides? Or maybe `os_nonblocking_random`, to communicate that it is using a non-blocking source? (I know that `/dev/random` and `/dev/urandom` are the same on Linux now but I think some other OSes still have a blocking source available) ---------------------------------------- Misc #17319: Rename Random::urandom to os_random and document random data sources https://bugs.ruby-lang.org/issues/17319#change-88455 * Author: zofrex (James Sanderson) * Status: Open * Priority: Normal ---------------------------------------- SecureRandom gets randomness from `Random::urandom`, which is a confusing name because `urandom` only uses /dev/urandom in some circumstances. On reading the `secure_random.rb` code this morning I got very confused how it was supporting "win32" for example, because it appears to only use openssl and /dev/urandom. I have renamed `urandom` to `os_random`. With this change, it is much more obvious from reading `secure_random.rb` what is happening, in my opinion. I have also added `urandom` as an alias to `os_random` so this is not a breaking change. I am not 100% sure I documented this alias correctly. I have also updated the documentation for `os_random` (was `urandom`), `SecureRandom`, and `random_raw_seed` to reflect that there are multiple potential sources for random data, not just urandom, openssl, and win32. -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>