mirror of
https://github.com/ruby/ruby.git
synced 2025-08-16 05:59:00 +02:00
* lib/optparse.rb (OptionParser::ParseError#set_backtrace): omits
OptionParser internal backtraces unless debug flag is set. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@19415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
206248255b
commit
9de8ab8b98
2 changed files with 12 additions and 0 deletions
|
@ -1607,6 +1607,13 @@ class OptionParser
|
|||
argv
|
||||
end
|
||||
|
||||
def set_backtrace(array)
|
||||
unless $DEBUG
|
||||
array.delete_if(&%r"\A#{Regexp.quote(__FILE__)}:"o.method(:=~))
|
||||
end
|
||||
super(array)
|
||||
end
|
||||
|
||||
def set_option(opt, eq)
|
||||
if eq
|
||||
@args[0] = opt
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue