summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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}" ]