summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-29 15:01:20 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-29 15:01:20 +0000
commit31eb19bbb66480f65defe1d00df42abe52f109dd (patch)
tree2915428d0a1eb4baed660433000f605855e2e6b2 /lib
parentd93746490d15deb4bdf35a47348106a41338002c (diff)
* lib/securerandom.rb: call OpenSSL::Random.seed at the
SecureRandom.random_bytes call. based on the patch by Masahiro Tomita. [ruby-dev:44270] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/securerandom.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/securerandom.rb b/lib/securerandom.rb
index d238a35406..04e8bc205e 100644
--- a/lib/securerandom.rb
+++ b/lib/securerandom.rb
@@ -57,7 +57,7 @@ module SecureRandom
n ||= 16
if defined? OpenSSL::Random
- @pid = $$ if !defined?(@pid)
+ @pid = 0 if !defined?(@pid)
pid = $$
if @pid != pid
now = Time.now