aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2023-06-07 03:44:07 +0900
committerKazuki Yamaguchi <k@rhe.jp>2023-06-07 03:45:58 +0900
commitf6ba75e51e05bdb2a88f33e3825ee7e45bd500b1 (patch)
tree245ab69d8f14719222bb5c8d68a02cfd2588ff92
parentcdec3c7dec329ebe4ea8b13dc08f7b2deae84d64 (diff)
downloadruby-openssl-f6ba75e51e05bdb2a88f33e3825ee7e45bd500b1.tar.gz
Drop support for Ruby 2.6ky/require-ruby-2.7
Ruby 2.6 has reached EOL on 2022-03. Requiring Ruby 2.7 allows us to use C99 syntax.
-rw-r--r--.github/workflows/test.yml2
-rw-r--r--ext/openssl/ossl.c16
-rw-r--r--ext/openssl/ossl.h6
-rw-r--r--openssl.gemspec2
4 files changed, 2 insertions, 24 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index a137877d..84b0580b 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -7,7 +7,7 @@ jobs:
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
with:
engine: cruby-truffleruby
- min_version: 2.6
+ min_version: 2.7
test:
needs: ruby-versions
name: >-
diff --git a/ext/openssl/ossl.c b/ext/openssl/ossl.c
index 81069c8b..c3b9f47a 100644
--- a/ext/openssl/ossl.c
+++ b/ext/openssl/ossl.c
@@ -369,22 +369,6 @@ ossl_get_errors(VALUE _)
*/
VALUE dOSSL;
-#if !defined(HAVE_VA_ARGS_MACRO)
-void
-ossl_debug(const char *fmt, ...)
-{
- va_list args;
-
- if (dOSSL == Qtrue) {
- fprintf(stderr, "OSSL_DEBUG: ");
- va_start(args, fmt);
- vfprintf(stderr, fmt, args);
- va_end(args);
- fprintf(stderr, " [CONTEXT N/A]\n");
- }
-}
-#endif
-
/*
* call-seq:
* OpenSSL.debug -> true | false
diff --git a/ext/openssl/ossl.h b/ext/openssl/ossl.h
index facb80aa..8add914f 100644
--- a/ext/openssl/ossl.h
+++ b/ext/openssl/ossl.h
@@ -157,7 +157,6 @@ VALUE ossl_to_der_if_possible(VALUE);
*/
extern VALUE dOSSL;
-#if defined(HAVE_VA_ARGS_MACRO)
#define OSSL_Debug(...) do { \
if (dOSSL == Qtrue) { \
fprintf(stderr, "OSSL_DEBUG: "); \
@@ -166,11 +165,6 @@ extern VALUE dOSSL;
} \
} while (0)
-#else
-void ossl_debug(const char *, ...);
-#define OSSL_Debug ossl_debug
-#endif
-
/*
* Include all parts
*/
diff --git a/openssl.gemspec b/openssl.gemspec
index 3a2f64f6..674dc20d 100644
--- a/openssl.gemspec
+++ b/openssl.gemspec
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
spec.extra_rdoc_files = Dir["*.md"]
spec.rdoc_options = ["--main", "README.md"]
- spec.required_ruby_version = ">= 2.6.0"
+ spec.required_ruby_version = ">= 2.7.0"
spec.metadata["msys2_mingw_dependencies"] = "openssl"
end