ruby-changes:30912
From: zzak <ko1@a...>
Date: Fri, 20 Sep 2013 23:40:14 +0900 (JST)
Subject: [ruby-changes:30912] zzak:r42991 (trunk): * lib/securerandom.rb: [DOC] SecureRandom.hex length argument
zzak 2013-09-20 23:40:08 +0900 (Fri, 20 Sep 2013) New Revision: 42991 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=42991 Log: * lib/securerandom.rb: [DOC] SecureRandom.hex length argument [Fixes GH-394] Patch by @avdi https://github.com/ruby/ruby/pull/394 Modified files: trunk/ChangeLog trunk/lib/securerandom.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 42990) +++ ChangeLog (revision 42991) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Fri Sep 20 23:37:40 2013 Zachary Scott <e@z...> + + * 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@z...> * benchmark/bm_app_answer.rb: removed duplicate code [Fixes GH-393] Index: lib/securerandom.rb =================================================================== --- lib/securerandom.rb (revision 42990) +++ lib/securerandom.rb (revision 42991) @@ -116,10 +116,10 @@ module SecureRandom https://github.com/ruby/ruby/blob/trunk/lib/securerandom.rb#L116 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. -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/