Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ohai committed Nov 29, 2024
2 parents 8dfbefb + bd832c8 commit 4943992
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions refm/api/src/_builtin/Array
Original file line number Diff line number Diff line change
Expand Up @@ -2258,6 +2258,14 @@ p a.sample(3) #=> [1, 9, 3]
p a #=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
#@end

random [[c:SecureRandom]] などの乱数生成器を渡すことができます。

#@samplecode 例
require 'securerandom'
a = (1..10).to_a
p a.sample(random: SecureRandom) #=> 2
#@end

--- cycle(n=nil) {|obj| block } -> nil
#@since 1.9.1
--- cycle(n=nil) -> Enumerator
Expand Down

0 comments on commit 4943992

Please sign in to comment.