[前][次][番号順一覧][スレッド一覧]

ruby-changes:48306

From: nobu <ko1@a...>
Date: Wed, 25 Oct 2017 16:28:28 +0900 (JST)
Subject: [ruby-changes:48306] nobu:r60420 (trunk): securerandom.rb: fix an example of choose [ci skip]

nobu	2017-10-25 16:28:22 +0900 (Wed, 25 Oct 2017)

  New Revision: 60420

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60420

  Log:
    securerandom.rb: fix an example of choose [ci skip]
    
    * lib/securerandom.rb (Random::Formatter#choose): [DOC] fix an
      example, `n` is not optional.

  Modified files:
    trunk/lib/securerandom.rb
Index: lib/securerandom.rb
===================================================================
--- lib/securerandom.rb	(revision 60419)
+++ lib/securerandom.rb	(revision 60420)
@@ -236,7 +236,7 @@ module Random::Formatter https://github.com/ruby/ruby/blob/trunk/lib/securerandom.rb#L236
   #
   # 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,

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]