summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/securerandom.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/securerandom.rb b/lib/securerandom.rb
index f12bc00114..4f2c35cabd 100644
--- a/lib/securerandom.rb
+++ b/lib/securerandom.rb
@@ -37,7 +37,7 @@ module SecureRandom
#
# The argument _n_ specifies the length of the result string.
#
- # If _n_ is not specified, 16 is assumed.
+ # If _n_ is not specified or is nil, 16 is assumed.
# It may be larger in future.
#
# The result may contain any byte: "\x00" - "\xff".
@@ -121,7 +121,7 @@ module SecureRandom
# 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.
+ # If _n_ is not specified or is nil, 16 is assumed.
# It may be larger in future.
#
# The result may contain 0-9 and a-f.
@@ -137,10 +137,10 @@ module SecureRandom
# SecureRandom.base64 generates a random base64 string.
#
- # The argument _n_ specifies the length of the random length.
- # The length of the result string is about 4/3 of _n_.
+ # The argument _n_ specifies the length, in bytes, of the random number
+ # to be generated. The length of the result string is about 4/3 of _n_.
#
- # If _n_ is not specified, 16 is assumed.
+ # If _n_ is not specified or is nil, 16 is assumed.
# It may be larger in future.
#
# The result may contain A-Z, a-z, 0-9, "+", "/" and "=".
@@ -158,10 +158,10 @@ module SecureRandom
# SecureRandom.urlsafe_base64 generates a random URL-safe base64 string.
#
- # The argument _n_ specifies the length of the random length.
- # The length of the result string is about 4/3 of _n_.
+ # The argument _n_ specifies the length, in bytes, of the random number
+ # to be generated. The length of the result string is about 4/3 of _n_.
#
- # If _n_ is not specified, 16 is assumed.
+ # If _n_ is not specified or is nil, 16 is assumed.
# It may be larger in future.
#
# The boolean argument _padding_ specifies the padding.