summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-02 10:08:10 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-04-02 10:08:10 +0000
commit817a96a45d686571c97892aa7c0b287539a5ecbd (patch)
tree162cd05861f9dd605200ae900914980c8a23d036
parente89c029f2b038a67b6d9b9dfc6bc9e429cab69b3 (diff)
* 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
-rw-r--r--ChangeLog5
-rw-r--r--lib/securerandom.rb2
2 files changed, 6 insertions, 1 deletions
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 <akr@fsij.org>
+
+ * 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 <naruse@ruby-lang.org>
* 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)