Skip to content

Commit

Permalink
* lib/securerandom.rb: [DOC] SecureRandom.hex length argument
Browse files Browse the repository at this point in the history
  [Fixes rubyGH-394] Patch by @avdi ruby#394


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
zzak committed Sep 20, 2013
1 parent 4585cb4 commit f067d25
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
6 changes: 3 additions & 3 deletions lib/securerandom.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ def self.random_bytes(n=nil)
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.
Expand Down

0 comments on commit f067d25

Please sign in to comment.