diff options
author | Nobuyoshi Nakada <[email protected]> | 2023-08-04 16:56:55 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2023-09-25 22:57:28 +0900 |
commit | 530b5ef6b6cf3c253f75f5c267234541f7ef4122 (patch) | |
tree | a5bc34a3c32aae06d188c5ba00d86ecb6ddffad8 /ruby.c | |
parent | be40eacc9d20118e27cfa7d047f7fceea5ef6ab6 (diff) |
Test bug_report
Diffstat (limited to 'ruby.c')
-rw-r--r-- | ruby.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -1352,6 +1352,8 @@ proc_encoding_option(ruby_cmdline_options_t *opt, const char *s, const char *opt UNREACHABLE; } +static const char *test_bug_report_template; + static long proc_long_options(ruby_cmdline_options_t *opt, const char *s, long argc, char **argv, int envopt) { @@ -1462,6 +1464,9 @@ proc_long_options(ruby_cmdline_options_t *opt, const char *s, long argc, char ** opt->backtrace_length_limit = n; } } + else if (is_option_with_arg("test-bugreport", true, false)) { + test_bug_report_template = s; + } else { rb_raise(rb_eRuntimeError, "invalid option --%s (-h will show valid options)", s); @@ -2911,6 +2916,10 @@ ruby_process_options(int argc, char **argv) iseq = process_options(argc, argv, cmdline_options_init(&opt)); + if (test_bug_report_template) { + void ruby_test_bug_report(const char *template); + ruby_test_bug_report(test_bug_report_template); + } return (void*)(struct RData*)iseq; } |