From 0d415a322f5dd7158efcbc6c3226266e312620c7 Mon Sep 17 00:00:00 2001 From: Koichi Sasada Date: Wed, 1 Mar 2023 17:07:50 +0900 Subject: Enable DEBUG_LOG feature on USE_RUBY_DEBUG_LOG `ruby_set_debug_option` is needed for `RUBY_DEBUG_LOG` feature so it should be called when `USE_RUBY_DEBUG_LOG` is true. --- main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'main.c') diff --git a/main.c b/main.c index 0d0ec147cd..072dc56dd5 100644 --- a/main.c +++ b/main.c @@ -23,6 +23,7 @@ #ifdef HAVE_LOCALE_H #include #endif + #if defined RUBY_DEVEL && !defined RUBY_DEBUG_ENV # define RUBY_DEBUG_ENV 1 #endif @@ -46,7 +47,7 @@ int rb_wasm_rt_start(int (main)(int argc, char **argv), int argc, char **argv); int main(int argc, char **argv) { -#ifdef RUBY_DEBUG_ENV +#if defined(RUBY_DEBUG_ENV) || USE_RUBY_DEBUG_LOG ruby_set_debug_option(getenv("RUBY_DEBUG")); #endif #ifdef HAVE_LOCALE_H -- cgit v1.2.1