зеркало из https://github.com/github/ruby.git
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
This commit is contained in:
Родитель
80f276e16f
Коммит
7ed3aae2fe
|
@ -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,
|
||||
|
|
Загрузка…
Ссылка в новой задаче