1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05: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/trunk@19415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2008-09-18 11:38:24 +00:00
parent bc9c077400
commit 45880b8e7d
2 changed files with 12 additions and 0 deletions

View file

@ -1,3 +1,8 @@
Thu Sep 18 20:37:59 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/optparse.rb (OptionParser::ParseError#set_backtrace): omits
OptionParser internal backtraces unless debug flag is set.
Thu Sep 18 20:02:48 2008 Yusuke Endoh <mame@tsg.ne.jp>
* lib/uri/common.rb (unescape): skip '%' to make String#hex work

View file

@ -1605,6 +1605,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