[前][次][番号順一覧][スレッド一覧]

ruby-changes:28013

From: akr <ko1@a...>
Date: Tue, 2 Apr 2013 19:09:40 +0900 (JST)
Subject: [ruby-changes:28013] akr:r40065 (trunk): * lib/securerandom.rb: Don't use Array#to_s.

akr	2013-04-02 19:08:10 +0900 (Tue, 02 Apr 2013)

  New Revision: 40065

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40065

  Log:
    * lib/securerandom.rb: Don't use Array#to_s.
       [ruby-core:52058] [Bug #7811] fixed by zzak (Zachary Scott).

  Modified files:
    trunk/ChangeLog
    trunk/lib/securerandom.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 40064)
+++ ChangeLog	(revision 40065)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Apr  2 18:49:01 2013  Tanaka Akira  <akr@f...>
+
+	* 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@r...>
 
 	* re.c (rb_reg_to_s): suppress duplicated charclass warning.
Index: lib/securerandom.rb
===================================================================
--- lib/securerandom.rb	(revision 40064)
+++ lib/securerandom.rb	(revision 40065)
@@ -62,7 +62,7 @@ module SecureRandom https://github.com/ruby/ruby/blob/trunk/lib/securerandom.rb#L62
       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)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]