diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-08-21 17:29:44 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-09-25 22:57:28 +0900 |
commit | f714448be7613017779d196daa72238b0efffaba (patch) | |
tree | ecf21280634c787c110e7d143d67cff3c3039af8 /ruby.c | |
parent | 70e8a08295114fa3cb112ddb42844889f7f98eb1 (diff) |
Honor the same option given later
Diffstat (limited to 'ruby.c')
-rw-r--r-- | ruby.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -899,6 +899,7 @@ moreswitches(const char *s, ruby_cmdline_options_t *opt, int envopt) ruby_features_t feat = opt->features; ruby_features_t warn = opt->warn; long backtrace_length_limit = opt->backtrace_length_limit; + const char *bugreport_path = opt->bugreport_path; while (ISSPACE(*s)) s++; if (!*s) return; @@ -953,6 +954,9 @@ moreswitches(const char *s, ruby_cmdline_options_t *opt, int envopt) if (BACKTRACE_LENGTH_LIMIT_VALID_P(backtrace_length_limit)) { opt->backtrace_length_limit = backtrace_length_limit; } + if (bugreport_path) { + opt->bugreport_path = bugreport_path; + } ruby_xfree(ptr); /* get rid of GC */ @@ -1464,9 +1468,7 @@ proc_long_options(ruby_cmdline_options_t *opt, const char *s, long argc, char ** } } else if (is_option_with_arg("bugreport-path", true, true)) { - if (!opt->bugreport_path) { - opt->bugreport_path = s; - } + opt->bugreport_path = s; } else { rb_raise(rb_eRuntimeError, |