From eae8a9143f04d6598b564787a45f03b27111cf9d Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 29 Jun 2007 07:57:24 +0000 Subject: * debug.c (ruby_set_debug_option): separated from main.c. * gc.c (ruby_gc_stress), signal.c (ruby_enable_coredump): prefixed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- main.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 82144b7c5a..24fbc2e9f3 100644 --- a/main.c +++ b/main.c @@ -30,20 +30,8 @@ int main(int argc, char **argv, char **envp) { #ifdef RUBY_DEBUG_ENV - RUBY_EXTERN int gc_stress; - RUBY_EXTERN int enable_coredump; - char *str; - str = getenv("RUBY_DEBUG"); - if (str) { - for (str = strtok(str, ","); str; str = strtok(NULL, ",")) { - if (strcmp(str, "gc_stress") == 0) - gc_stress = 1; - else if (strcmp(str, "core") == 0) - enable_coredump = 1; - else - fprintf(stderr, "unexpected debug option: %s\n", str); - } - } + extern void ruby_set_debug_option(const char *); + ruby_set_debug_option(getenv("RUBY_DEBUG")); #endif #ifdef _WIN32 NtInitialize(&argc, &argv); -- cgit v1.2.1