aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-20 14:40:08 +0000
committerzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-09-20 14:40:08 +0000
commit9408bba58be4b2d92bd2a7f9b39f442cddf81bdc (patch)
tree6f50fa09f0a5fef533e2e861676f3ae63c681f8a
parent000f39b4ff3d3954651f1e59dd3825f3e730d008 (diff)
downloadruby-9408bba58be4b2d92bd2a7f9b39f442cddf81bdc.tar.gz
* lib/securerandom.rb: [DOC] SecureRandom.hex length argument
[Fixes GH-394] Patch by @avdi https://github.com/ruby/ruby/pull/394 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/securerandom.rb6
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 1769ad28dd..f2e2a11d6a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Sep 20 23:37:40 2013 Zachary Scott <e@zzak.io>
+
+ * lib/securerandom.rb: [DOC] SecureRandom.hex length argument
+ [Fixes GH-394] Patch by @avdi https://github.com/ruby/ruby/pull/394
+
Fri Sep 20 23:34:48 2013 Zachary Scott <e@zzak.io>
* benchmark/bm_app_answer.rb: removed duplicate code [Fixes GH-393]
diff --git a/lib/securerandom.rb b/lib/securerandom.rb
index b1603b4ca9..f12bc00114 100644
--- a/lib/securerandom.rb
+++ b/lib/securerandom.rb
@@ -116,10 +116,10 @@ module SecureRandom
raise NotImplementedError, "No random device"
end
- # SecureRandom.hex generates a random hex string.
+ # SecureRandom.hex generates a random hexadecimal string.
#
- # The argument _n_ specifies the length of the random length.
- # The length of the result string is twice of _n_.
+ # The argument _n_ specifies the length, in bytes, of the random number to be generated.
+ # The length of the resulting hexadecimal string is twice _n_.
#
# If _n_ is not specified, 16 is assumed.
# It may be larger in future.