ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:101734] [Ruby master Feature#17479] Enable to get "--backtrace-limit" value by "$-B"
@ 2020-12-27 10:03 nodai2h.ITC
  2020-12-27 11:06 ` [ruby-core:101739] " mame
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: nodai2h.ITC @ 2020-12-27 10:03 UTC (permalink / raw)
  To: ruby-core

Issue #17479 has been reported by neg_hide (Hidenori Negishi).

----------------------------------------
Feature #17479: Enable to get "--backtrace-limit" value by "$-B"
https://bugs.ruby-lang.org/issues/17479

* Author: neg_hide (Hidenori Negishi)
* Status: Open
* Priority: Normal
----------------------------------------
# Background

There is currently no way to get "--backtrace-limit" value when outputing backtraces from my script, so I have to ignore this value and output backtraces.

In order to be able to output according to "--backtrace-limit" value, I need a API to get this value from the Ruby side.

# Proposal

I propose a readonly built-in variable "$-B" to get "--backtrace-limit" value.

``` ruby
# ruby --backtrace-limit=3 script.rb

puts $-B # => 3
```



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-01-15 14:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-27 10:03 [ruby-core:101734] [Ruby master Feature#17479] Enable to get "--backtrace-limit" value by "$-B" nodai2h.ITC
2020-12-27 11:06 ` [ruby-core:101739] " mame
2020-12-27 16:03 ` [ruby-core:101745] " eregontp
2020-12-28 14:47 ` [ruby-core:101782] " nodai2h.ITC
2021-01-13  5:50 ` [ruby-core:102049] " matz
2021-01-13  7:10 ` [ruby-core:102055] " merch-redmine
2021-01-14 13:20 ` [ruby-core:102092] " eregontp
2021-01-15 14:44 ` [ruby-core:102105] " nodai2h.ITC

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).