diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-03-04 13:39:46 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-03-04 13:39:46 +0000 |
commit | f9fc092f90cc7478a928a6d62bfffbb49c96534d (patch) | |
tree | 8ecc5e4f9f52eb40ea6ebbc2ae6aefa8dacd6a4f /lib/securerandom.rb | |
parent | 6b327e72c38ebfefe62221fa658ce2fbbed24f51 (diff) |
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
Diffstat (limited to 'lib/securerandom.rb')
-rw-r--r-- | lib/securerandom.rb | 3 |
1 files changed, 1 insertions, 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) |