aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2023-03-01 17:07:50 +0900
committerKoichi Sasada <ko1@atdot.net>2023-03-01 17:18:43 +0900
commit0d415a322f5dd7158efcbc6c3226266e312620c7 (patch)
treeeaab15c01369b3551ca0aac179780afe09bee70b /main.c
parent40e5ee64f08c5a264b95dc2d35d5d3cbcbf858a0 (diff)
downloadruby-0d415a322f5dd7158efcbc6c3226266e312620c7.tar.gz
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.
Diffstat (limited to 'main.c')
-rw-r--r--main.c3
1 files changed, 2 insertions, 1 deletions
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 <locale.h>
#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