summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-01-30 17:50:37 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-01-30 17:50:37 +0000
commitb97b9230007f0ecc281f3212576be18190d23dc2 (patch)
tree544e077dfca75984ef56669ffd7b003a22420378 /lib
parent10633dfa0d4203e6ae9b330f79ded1b228855a7d (diff)
downloadruby-b97b9230007f0ecc281f3212576be18190d23dc2.tar.gz
ruby-b97b9230007f0ecc281f3212576be18190d23dc2.tar.xz
ruby-b97b9230007f0ecc281f3212576be18190d23dc2.zip
* lib/optparse.rb (OptionParser::List::accept): default
pattern must not be nil. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/optparse.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/optparse.rb b/lib/optparse.rb
index fd0e1394f..5be91eb27 100644
--- a/lib/optparse.rb
+++ b/lib/optparse.rb
@@ -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