mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
bcaf84e89c
commit
88aaf88923
1 changed files with 5 additions and 0 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue