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

ruby-changes:32703

From: zzak <ko1@a...>
Date: Sat, 1 Feb 2014 06:12:53 +0900 (JST)
Subject: [ruby-changes:32703] zzak:r44782 (trunk): * lib/securerandom.rb: [DOC] Add note on require for examples

zzak	2014-02-01 06:12:49 +0900 (Sat, 01 Feb 2014)

  New Revision: 44782

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44782

  Log:
    * lib/securerandom.rb: [DOC] Add note on require for examples
      Based on a patch by @schneems [Fixes GH-518] [ci skip]
      https://github.com/ruby/ruby/pull/518

  Modified files:
    trunk/ChangeLog
    trunk/lib/securerandom.rb
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 44781)
+++ ChangeLog	(revision 44782)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Sat Feb  1 06:10:49 2014  Zachary Scott  <e@z...>
+
+	* lib/securerandom.rb: [DOC] Add note on require for examples
+	  Based on a patch by @schneems [Fixes GH-518] [ci skip]
+	  https://github.com/ruby/ruby/pull/518
+
 Sat Feb  1 06:04:56 2014  Zachary Scott  <e@z...>
 
 	* numeric.c: [DOC] Fix typo in example for #step [ci skip]
Index: lib/securerandom.rb
===================================================================
--- lib/securerandom.rb	(revision 44781)
+++ lib/securerandom.rb	(revision 44782)
@@ -8,6 +8,10 @@ end https://github.com/ruby/ruby/blob/trunk/lib/securerandom.rb#L8
 # This library is an interface for secure random number generator which is
 # suitable for generating session key in HTTP cookies, etc.
 #
+# You can use this library in your application by requiring it:
+#
+#   require 'securerandom'
+#
 # It supports following secure random number generators.
 #
 # * openssl
@@ -18,6 +22,8 @@ end https://github.com/ruby/ruby/blob/trunk/lib/securerandom.rb#L22
 #
 # Hexadecimal string.
 #
+#   require 'securerandom'
+#
 #   p SecureRandom.hex(10) #=> "52750b30ffbc7de3b362"
 #   p SecureRandom.hex(10) #=> "92b15d6c8dc4beb5f559"
 #   p SecureRandom.hex(13) #=> "39b290146bea6ce975c37cfc23"

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

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