diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/securerandom.rb | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -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) |