From 7ed3aae2feb91c584c5402dd6f63c145acd1f033 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 25 Oct 2017 07:28:22 +0000 Subject: [PATCH] securerandom.rb: fix an example of choose [ci skip] * lib/securerandom.rb (Random::Formatter#choose): [DOC] fix an example, `n` is not optional. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/securerandom.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/securerandom.rb b/lib/securerandom.rb index 97911d4d6a..6d5520f605 100644 --- a/lib/securerandom.rb +++ b/lib/securerandom.rb @@ -236,7 +236,7 @@ module Random::Formatter # # The result may contain whatever characters are in the source array. # - # p SecureRandom.choose([*'l'..'r']) #=> "lmrqpoonmmlqlron" + # p SecureRandom.choose([*'l'..'r'], 16) #=> "lmrqpoonmmlqlron" # p SecureRandom.choose([*'0'..'9'], 5) #=> "27309" # # If a secure random number generator is not available,