From 795fb51f80e0cda19d39480bdaa26ecdab3557a9 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Wed, 28 Apr 2021 18:40:45 +0900 Subject: NDEBUG is ignored since Ruby 3.0 --- ext/digest/rmd160/extconf.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ext') diff --git a/ext/digest/rmd160/extconf.rb b/ext/digest/rmd160/extconf.rb index ffa70ee803..a923dcf9be 100644 --- a/ext/digest/rmd160/extconf.rb +++ b/ext/digest/rmd160/extconf.rb @@ -6,7 +6,10 @@ require "mkmf" require File.expand_path("../../digest_conf", __FILE__) -$defs << "-DNDEBUG" << "-DHAVE_CONFIG_H" +if try_static_assert("RUBY_API_VERSION_MAJOR < 3", "ruby/version.h") + $defs << "-DNDEBUG" +end +$defs << "-DHAVE_CONFIG_H" $objs = [ "rmd160init.#{$OBJEXT}" ] -- cgit v1.2.1