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
commit8c29dd85201fc0843fe8ff1e93efcfa870430bf8 (patch)
tree8728df76e1dbd5d7b1c760ef1a63031563e9636f /lib
parent7a261bf317ed232ef2621197bc75d8563559700b (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/branches/ruby_1_9_3@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