aboutsummaryrefslogtreecommitdiffstats
path: root/ext/openssl/deprecation.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/openssl/deprecation.rb')
-rw-r--r--ext/openssl/deprecation.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/openssl/deprecation.rb b/ext/openssl/deprecation.rb
index 1d51d065..afe989ea 100644
--- a/ext/openssl/deprecation.rb
+++ b/ext/openssl/deprecation.rb
@@ -3,7 +3,7 @@ module OpenSSL
def self.deprecated_warning_flag
unless flag = (@deprecated_warning_flag ||= nil)
if try_compile("", flag = "-Werror=deprecated-declarations")
- $warnflags << " #{flag}"
+ $warnflags = "#{@warnflags = $warnflags}" #{flag}"
else
flag = ""
end
@@ -12,6 +12,10 @@ module OpenSSL
flag
end
+ def self.restore_warning_flag
+ $warnflags = @warnflags
+ end
+
def self.check_func(func, header)
have_func(func, header, deprecated_warning_flag)
end