From f9fc092f90cc7478a928a6d62bfffbb49c96534d Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 4 Mar 2016 13:39:46 +0000 Subject: [PATCH] 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 --- lib/securerandom.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/securerandom.rb b/lib/securerandom.rb index 198f273c88..c2eddbd5a3 100644 --- a/lib/securerandom.rb +++ b/lib/securerandom.rb @@ -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)