diff options
author | stomar <stomar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-06-12 20:22:43 +0000 |
---|---|---|
committer | stomar <stomar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-06-12 20:22:43 +0000 |
commit | 2cf025d1a484792bba32b742a38233282eaec26f (patch) | |
tree | c782aca333252db7066cc3c9b6d6716c0916c2cd /lib | |
parent | 01f07841f94b39571403739462fe6b2a799b1f2d (diff) | |
download | ruby-2cf025d1a484792bba32b742a38233282eaec26f.tar.gz |
lib/securerandom.rb: improve docs
* lib/securerandom.rb: [DOC] add alphanumeric example to module docs.
[Fix GH-1812]
From: Justin Bull <me@justinbull.ca>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/securerandom.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/securerandom.rb b/lib/securerandom.rb index fcbe1b1d5f..470b48dd6b 100644 --- a/lib/securerandom.rb +++ b/lib/securerandom.rb @@ -37,6 +37,11 @@ # SecureRandom.random_bytes(10) #=> "\016\t{\370g\310pbr\301" # SecureRandom.random_bytes(10) #=> "\323U\030TO\234\357\020\a\337" # +# Generate alphanumeric strings: +# +# SecureRandom.alphanumeric(10) #=> "S8baxMJnPl" +# SecureRandom.alphanumeric(10) #=> "aOxAg8BAJe" +# # Generate UUIDs: # # SecureRandom.uuid #=> "2d931510-d99f-494a-8c67-87feb05e1594" |