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::List::accept): default

pattern must not be nil.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2003-01-30 17:50:37 +00:00
parent 15805c17aa
commit 1c37352f8a
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Fri Jan 31 02:50:34 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* lib/optparse.rb (OptionParser::List::accept): default
pattern must not be nil.
Thu Jan 30 16:46:43 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* lib/optparse.rb (OptionParser::Switch::PlacedArgument): added.

View file

@ -388,7 +388,7 @@ summary feature.
--- OptionParser::List#reject(type)
see ((<OptionParser.reject>)).
=end #'#"#`#
def accept(t, pat = nil, &block)
def accept(t, pat = /.*/, &block)
if pat
pat.respond_to?(:match) or raise TypeError, "has no `match'"
else