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/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
|
@ -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 15:38:49 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Thu Sep 18 15:38:49 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* ext/socket/socket.c (Init_socket): add new constants. a patch from
|
* ext/socket/socket.c (Init_socket): add new constants. a patch from
|
||||||
|
|
|
@ -1607,6 +1607,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…
Add table
Add a link
Reference in a new issue