diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-01-30 17:50:37 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-01-30 17:50:37 +0000 |
| commit | b97b9230007f0ecc281f3212576be18190d23dc2 (patch) | |
| tree | 544e077dfca75984ef56669ffd7b003a22420378 /lib | |
| parent | 10633dfa0d4203e6ae9b330f79ded1b228855a7d (diff) | |
| download | ruby-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.rb | 2 |
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 |
