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:
parent
bc9c077400
commit
45880b8e7d
2 changed files with 12 additions and 0 deletions
|
@ -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>
|
Thu Sep 18 20:02:48 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
||||||
|
|
||||||
* lib/uri/common.rb (unescape): skip '%' to make String#hex work
|
* lib/uri/common.rb (unescape): skip '%' to make String#hex work
|
||||||
|
|
|
@ -1605,6 +1605,13 @@ class OptionParser
|
||||||
argv
|
argv
|
||||||
end
|
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)
|
def set_option(opt, eq)
|
||||||
if eq
|
if eq
|
||||||
@args[0] = opt
|
@args[0] = opt
|
||||||
|
|
Loading…
Reference in a new issue