1
0
Fork 0
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:
nobu 2016-03-04 13:39:46 +00:00
parent 6b327e72c3
commit f9fc092f90

View file

@ -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)