diff options
| author | Scott Myron <samyron@gmail.com> | 2025-11-17 21:08:29 -0600 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2025-11-18 08:20:51 +0000 |
| commit | f272aabb5c007d4a8f15e141edbd1bf2d079c5fc (patch) | |
| tree | bc1fc17150e96cf843db797035b53a50c3bb3769 /ext/json/parser | |
| parent | 54c07383095957c49d91300af6012ff43d41160f (diff) | |
[ruby/json] Use #if instead of #ifdef when checking for JSON_DEBUG so debugging code is not generated when JSON_DEBUG=0.
https://github.com/ruby/json/commit/4f1adb10d3
Diffstat (limited to 'ext/json/parser')
| -rw-r--r-- | ext/json/parser/extconf.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/json/parser/extconf.rb b/ext/json/parser/extconf.rb index 079b37382d..2440e66d8b 100644 --- a/ext/json/parser/extconf.rb +++ b/ext/json/parser/extconf.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true require 'mkmf' -$defs << "-DJSON_DEBUG" if ENV["JSON_DEBUG"] +$defs << "-DJSON_DEBUG" if ENV.fetch("JSON_DEBUG", "0") != "0" have_func("rb_enc_interned_str", "ruby/encoding.h") # RUBY_VERSION >= 3.0 have_func("rb_str_to_interned_str", "ruby.h") # RUBY_VERSION >= 3.0 have_func("rb_hash_new_capa", "ruby.h") # RUBY_VERSION >= 3.2 |
