aboutsummaryrefslogtreecommitdiffstats
path: root/ruby.c
diff options
context:
space:
mode:
authorTom Stuart <hi@tomstu.art>2023-07-01 15:15:09 +0100
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-07-16 00:39:01 +0900
commit72a3bb7edc0b5a0cad73e06f8b136f9360cccdd2 (patch)
tree77693aa97ea7f44077ac4af076e885e2585850e6 /ruby.c
parente5825de7c9f07e4f7bd2b83ce8973e19a4652916 (diff)
downloadruby-72a3bb7edc0b5a0cad73e06f8b136f9360cccdd2.tar.gz
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
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ruby.c b/ruby.c
index 28579022fe..92ea37b4f6 100644
--- a/ruby.c
+++ b/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");