From 817a96a45d686571c97892aa7c0b287539a5ecbd Mon Sep 17 00:00:00 2001 From: akr Date: Tue, 2 Apr 2013 10:08:10 +0000 Subject: [PATCH] * lib/securerandom.rb: Don't use Array#to_s. [ruby-core:52058] [Bug #7811] fixed by zzak (Zachary Scott). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ lib/securerandom.rb | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4c15fda4a3..f9b208df1e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Apr 2 18:49:01 2013 Tanaka Akira + + * lib/securerandom.rb: Don't use Array#to_s. + [ruby-core:52058] [Bug #7811] fixed by zzak (Zachary Scott). + Tue Apr 2 17:38:20 2013 NARUSE, Yui * re.c (rb_reg_to_s): suppress duplicated charclass warning. diff --git a/lib/securerandom.rb b/lib/securerandom.rb index 15fe86f444..0127838b00 100644 --- a/lib/securerandom.rb +++ b/lib/securerandom.rb @@ -62,7 +62,7 @@ module SecureRandom if @pid != pid now = Time.now ary = [now.to_i, now.nsec, @pid, pid] - OpenSSL::Random.seed(ary.to_s) + OpenSSL::Random.seed(ary.join("").to_s) @pid = pid end return OpenSSL::Random.random_bytes(n)