summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-13 04:10:25 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-13 04:10:25 +0000
commitc620acaced507cd0d61e7e9d7acbeca9cb99f158 (patch)
treedc454966877a5c48c2412a44c9d69213e01111f2
parent54eb4c1930f81998efe64661e1a6d82df915e9ba (diff)
* lib/securerandom.rb: skip Win32 libraries in SecureRandom if
OpenSSL::Random is available. https://github.com/ruby/ruby/pull/848 [Bug #10948] [Bug #10995] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@50281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog6
-rw-r--r--lib/securerandom.rb2
-rw-r--r--version.h2
3 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index b1dc9a70a2..0c35d3697d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Mon Apr 13 13:03:33 2015 CHIKANAGA Tomoyuki <nagachika@ruby-lang.org>
+
+ * lib/securerandom.rb: skip Win32 libraries in SecureRandom if
+ OpenSSL::Random is available.
+ https://github.com/ruby/ruby/pull/848 [Bug #10948] [Bug #10995]
+
Mon Apr 13 00:49:56 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
* parse.y (arg): fix segfault by null caused by syntax error.
diff --git a/lib/securerandom.rb b/lib/securerandom.rb
index 3e932f6b0e..c26bf50b02 100644
--- a/lib/securerandom.rb
+++ b/lib/securerandom.rb
@@ -40,7 +40,7 @@ end
# p SecureRandom.random_bytes(10) #=> "\016\t{\370g\310pbr\301"
# p SecureRandom.random_bytes(10) #=> "\323U\030TO\234\357\020\a\337"
module SecureRandom
- if /mswin|mingw/ =~ RUBY_PLATFORM
+ if !defined?(OpenSSL::Random) && /mswin|mingw/ =~ RUBY_PLATFORM
require "fiddle/import"
module AdvApi32 # :nodoc:
diff --git a/version.h b/version.h
index 975e122b15..eaf9994e8d 100644
--- a/version.h
+++ b/version.h
@@ -1,6 +1,6 @@
#define RUBY_VERSION "2.2.2"
#define RUBY_RELEASE_DATE "2015-04-13"
-#define RUBY_PATCHLEVEL 93
+#define RUBY_PATCHLEVEL 94
#define RUBY_RELEASE_YEAR 2015
#define RUBY_RELEASE_MONTH 4