Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --backtrace-limit=num #2463

Merged
merged 2 commits into from
Feb 28, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions refm/doc/spec/rubycmd.rd
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,32 @@ Rubyインタプリタは以下のコマンドラインオプションを受け
が実行されます。`-n'か`-p'オプションが同時に指定されない限り,
このオプションは意味を持ちません。

#@since 3.0.0
: --backtrace-limit=num

バックトレースの最大行数を指定します。

//emlist{
# test.rb
def f6 = raise
def f5 = f6
def f4 = f5
def f3 = f4
def f2 = f3
def f1 = f2
f1
//}

//emlist{
% ruby --backtrace-limit=3 test.rb
test.rb:1:in `f6': unhandled exception
from test.rb:2:in `f5'
from test.rb:3:in `f4'
from test.rb:4:in `f3'
... 3 levels...
//}
#@end

: -C directory

スクリプト実行前に指定されたディレクトリに移動します。
Expand Down