Allow --backtrace-limit
option to appear in RUBYOPT
There’s no reason to prevent RUBYOPT from controlling the backtrace limit. In fact, Matz said [0] he was expecting this to be possible. [0] https://bugs.ruby-lang.org/issues/8661#note-27
This commit is contained in:
parent
e5825de7c9
commit
72a3bb7edc
2
ruby.c
2
ruby.c
@ -1446,7 +1446,7 @@ proc_long_options(ruby_cmdline_options_t *opt, const char *s, long argc, char **
|
||||
opt->dump |= DUMP_BIT(help);
|
||||
return 0;
|
||||
}
|
||||
else if (is_option_with_arg("backtrace-limit", Qfalse, Qfalse)) {
|
||||
else if (is_option_with_arg("backtrace-limit", Qfalse, Qtrue)) {
|
||||
char *e;
|
||||
long n = strtol(s, &e, 10);
|
||||
if (errno == ERANGE || n < 0 || *e) rb_raise(rb_eRuntimeError, "wrong limit for backtrace length");
|
||||
|
Loading…
x
Reference in New Issue
Block a user