[#115244] [Ruby master Feature#19987] add sample method to Range — "horv77@... (Andras Horvath) via ruby-core" <ruby-core@...>
Issue #19987 has been reported by horv77@protonmail.com (Andras Horvath).
6 messages
2023/11/05
[#115247] [Ruby master Feature#19988] AI for inner code behavior analysis at runtime — "horv77@... (Andras Horvath) via ruby-core" <ruby-core@...>
Issue #19988 has been reported by horv77@protonmail.com (Andras Horvath).
3 messages
2023/11/05
[#115404] Ruby 3.2.2 - rbconfig.rb's MAKEFILE_CONFIG — Jay Mav via ruby-core <ruby-core@...>
Hello Ruby Dev Team,
4 messages
2023/11/17
[ruby-core:115249] [Ruby master Feature#19987] add sample method to Range
From:
"rubyFeedback (robert heiler) via ruby-core" <ruby-core@...>
Date:
2023-11-05 13:44:47 UTC
List:
ruby-core #115249
Issue #19987 has been updated by rubyFeedback (robert heiler). I think conceptually .first() is not the same as .sample(). At the least when I read it, I would assume that .first() yields the first five elements (if the argument is 5), whereas .sample() should probably return 5 random elements. Not sure if others read it the same way, but that was my initial impression. ---------------------------------------- Feature #19987: add sample method to Range https://bugs.ruby-lang.org/issues/19987#change-105161 * Author: horv77@protonmail.com (Andras Horvath) * Status: Open * Priority: Normal ---------------------------------------- Dear Devs, I'd like to suggest a change. Since the following works: (1..99).first(5) Therefore this one could be logical and useful to work: (1..99).sample(5) Thanks, Andras -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/