summaryrefslogtreecommitdiff
path: root/ext/digest/rmd160
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-04-28 18:40:45 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-04-28 18:48:08 +0900
commit795fb51f80e0cda19d39480bdaa26ecdab3557a9 (patch)
treee98a5d86b69c86b0b1cfb44c82a4d692642ff777 /ext/digest/rmd160
parentf985dafee7548faad2b35efeda5e844a8e13d336 (diff)
NDEBUG is ignored since Ruby 3.0
Diffstat (limited to 'ext/digest/rmd160')
-rw-r--r--ext/digest/rmd160/extconf.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/digest/rmd160/extconf.rb b/ext/digest/rmd160/extconf.rb
index ffa70ee803f..a923dcf9beb 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}" ]