diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-06-29 07:57:24 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-06-29 07:57:24 +0000 |
commit | 1fcd892931d1397d2299669f377311ffb475d1dd (patch) | |
tree | 18c4c0ed798e4464c39750100cf67b8a5957ddd0 /main.c | |
parent | feafc9c06833a1e45cc995024e957316358a838a (diff) | |
download | ruby-1fcd892931d1397d2299669f377311ffb475d1dd.tar.gz ruby-1fcd892931d1397d2299669f377311ffb475d1dd.tar.xz ruby-1fcd892931d1397d2299669f377311ffb475d1dd.zip |
* debug.c (ruby_set_debug_option): separated from main.c.
* gc.c (ruby_gc_stress), signal.c (ruby_enable_coredump): prefixed.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 16 |
1 files changed, 2 insertions, 14 deletions
@@ -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); |