mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
securerandom.rb: remove to_s call
* lib/securerandom.rb (gen_random): Array#join returns a String, no to_s is needed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6b327e72c3
commit
f9fc092f90
1 changed files with 1 additions and 2 deletions
|
@ -54,8 +54,7 @@ module SecureRandom
|
|||
pid = $$
|
||||
unless @pid == pid
|
||||
now = Process.clock_gettime(Process::CLOCK_REALTIME, :nanosecond)
|
||||
ary = [now, @pid, pid]
|
||||
OpenSSL::Random.random_add(ary.join("").to_s, 0.0)
|
||||
OpenSSL::Random.random_add([now, @pid, pid].join(""), 0.0)
|
||||
seed = Random.raw_seed(16)
|
||||
if (seed)
|
||||
OpenSSL::Random.random_add(seed, 16)
|
||||
|
|
Loading…
Reference in a new issue