aboutsummaryrefslogtreecommitdiffstats
path: root/lib/optparse.rb
Commit message (Collapse)AuthorAgeFilesLines
* optparse.rb: [DOC] fix example code [ci skip]nobu2016-04-281-78/+79
| | | | | | | * lib/optparse.rb: [DOC] fix example code. base on the code by Semyon Gaivoronskiy in [ruby-core:75224]. [Bug #12323] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* get rid of ruby-mode.el bugsnobu2016-02-061-2/+2
| | | | | | | | * lib/optparse.rb: get rid of confusing ruby-mode.el of Emacs 24, - if-end expression inside an expression - a comma just followed by a bar git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* optparse.rb: into kwdargnobu2016-01-061-13/+14
| | | | | | | * lib/optparse.rb (OptionParser#order!): add `into` optional keyword argument to store the results. [Feature #11191] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* [DOC] Fix typosa_matsuda2015-12-231-2/+2
| | | | | | | | | | | | | | | | | * benchmark.rb * getoptlong.rb * irb.rb * net/http.rb * net/http/header.rb * net/imap.rb * optparse.rb * pstore.rb * webrick.rb * xmlrpc.rb [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add frozen_string_literal: false for all filesnaruse2015-12-161-0/+1
| | | | | | When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* optparse.rb: Fix typo [ci skip]nobu2015-12-081-1/+1
| | | | | | | * lib/optparse.rb: fix double word typo in the document. [Misc #10608] [Fix GH-1126] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typo in OptionParser#complete docs [ci skip]nobu2015-07-211-1/+1
| | | | | | * lib/optparse.rb (complete): [DOC] fix typo. [Fix GH-973] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix typo in optparse library [ci skip] [Fix GH-956]nobu2015-07-051-1/+1
| | | | | | * lib/optparse.rb: [DOC] Fix typo. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* optparse.rb: update --version example [ci skip]nobu2015-02-081-1/+3
| | | | | | | * lib/optparse.rb (OptparseExample): [DOC] update example code for --version option, to print OptparseExample::Version. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb: improvements for OptionParser documentation.hsbt2015-01-121-77/+218
| | | | | | [misc #10608][ruby-core:66901][ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* optparse.rb: getopts message improvementnobu2014-07-211-3/+5
| | | | | | | * lib/optparse.rb (getopts): print default values and descriptions in the help message. [fix GH-676] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/gserver.rb: remove redundant use of to_s in interpolation.hsbt2014-06-241-1/+1
| | | | | | | | | | * lib/logger.rb: ditto. * lib/optparse.rb: ditto. * lib/rbconfig/obsolete.rb: ditto. * lib/resolv.rb: ditto. * lib/webrick/httpresponse.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/optionparser.rbnobu2014-05-261-0/+2
| | | | | | | * lib/optionparser.rb, lib/optparse.rb (OptParse): aliases. [ruby-core:62751] [Feature #9864] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb: [DOC] Add example of generating help with optparse.zzak2014-02-271-0/+37
| | | | | | | | Patch by @joelmccracken documenting-ruby/ruby#19 https://github.com/documenting-ruby/ruby/pull/19 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* optparse.rb: regexp at lhsnobu2013-11-281-1/+1
| | | | | | | * lib/optparse.rb (OptionParser::Switch#compsys): regexp literal should be lhs of =~. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43891 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* optparse.rb: remove $Id$nobu2013-09-081-13/+1
| | | | | | | * lib/optparse.rb (OptionParser): remove constants depending on $Id$. [Bug #8877] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb: The Integer acceptable now allows binary anddrbrain2013-09-051-9/+34
| | | | | | | | | | | | | hexadecimal numbers per the documentation. [ruby-trunk - Bug #8865] DecimalInteger, OctalInteger, DecimalNumeric now validate their input before converting to a number. [ruby-trunk - Bug #8865] * test/optparse/test_acceptable.rb: Tests for the above, tests for all numeric acceptables for existing behavior. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb: nodoc Object::Version and SPLAT_PROCzzak2013-05-191-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typos. Patch by k_takata.ktsj2013-05-191-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb: Documentation for OptionParser to remove 'shadowedzzak2012-12-221-2/+6
| | | | | | | | | outer local variable' from example and make obvious ARGV with non-option arguments. Patch by Marcus Stollsteimer [ruby-core:47460] [Bug #6997] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb: Remove 'developer documentation' section from rdoczzak2012-12-171-0/+3
| | | | | | | Patch by Marcus Stollsteimer [ruby-core:50526][Bug #7504] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb: Remove unreachable email address from documentationzzak2012-09-131-2/+1
| | | | | | | [Bug #6996] [ruby-core:47459] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb (OptionParser#to_a): split for each lines.nobu2012-04-241-1/+1
| | | | | | [ruby-dev:45568][Bug #6348] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb (OptionParser#to_a): should split by end-of-line,naruse2012-04-241-1/+1
| | | | | | | and MUST TEST IT, MUST RUN THE TEST, MUST VERIFY BEFORE BACKPORT. [ruby-dev:45568][Bug #6348] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb (OptionParser#to_a): should split by end-of-linenobu2012-04-241-1/+1
| | | | | | | [ruby-dev:45568][Bug #6348] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb (OptionParser#to_a): String#to_a is no longernobu2012-04-241-2/+2
| | | | | | | defined. [ruby-dev:45568][Bug #6348] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb (Regexp): fix incorrect options when casting tonobu2012-01-161-1/+2
| | | | | | | | a Regexp, and suppress encoding option warnings. https://github.com/ruby/ruby/pull/82 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb: Add link to make_switch to improve documentation.drbrain2011-05-161-1/+2
| | | | | | | Patch by David Copeland. [Ruby 1.9 - Bug #4708] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31600 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb (OptionParser#compsys): escape brackets too.kazu2010-12-261-1/+1
| | | | | | [ruby-dev:42754] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * misc/rb_optparse.zsh: update how to install.kazu2010-12-121-1/+2
| | | | | | | | | * misc/rb_optparse.zsh: avoid error when setopt noclobber. * lib/optparse.rb: fix typo. pointed out at <http://d.hatena.ne.jp/nagachika/20101207>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb (OptionParser::Officious): separate completionnobu2010-12-071-11/+19
| | | | | | options from --help. [ruby-dev:42690] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb (OptionParser::Completion#candidate),nobu2010-12-071-2/+1
| | | | | | (OptionParser::Switch#compsys): remove unused variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb (OptionParser#candidate): skip separators.nobu2010-12-061-0/+1
| | | | | | | * sample/optparse/opttest.rb: should not override --help. [ruby-dev:42690] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30098 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb (OptionParser#candidate): : was missing. Thanks,shugo2010-11-271-1/+1
| | | | | | Shota Fukumori. [ruby-dev:42634] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb (OptionParser#candidate): get rid of 1.9 syntaxnobu2010-11-271-2/+2
| | | | | | so that BASERUBY can be 1.8. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb: shell completion support for zsh. based onnobu2010-11-191-0/+49
| | | | | | <http://d.hatena.ne.jp/rubikitch/20071002/zshcomplete> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb: shell completion support for bash.nobu2010-11-191-8/+62
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb: suppress a warning.akr2010-08-101-1/+1
| | | | | | | | * test/test_mutex_m.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb (Numeric): accept rationals.nobu2010-03-291-3/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib: fixed typo. a patch by Sho Hashimoto in [ruby-dev:40716].nobu2010-03-201-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb (OptionParser#parse_in_order): do not make annobu2009-04-261-1/+1
| | | | | | | option from non-option argument. [ruby-dev:38333] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * {ext,lib,test}/**/*.rb: removed trailing spaces.nobu2009-03-061-34/+34
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb (Switch#summarize): strips an equal sign fromnobu2009-02-011-1/+7
| | | | | | | | short option, and fills right sides in shorter lines. [ruby-talk:326414] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb (List#accept, parse_in_order): n option is nonobu2009-01-311-4/+4
| | | | | | | longer needed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb (OptionParser::List#summarize): gives prioritynobu2008-12-261-6/+11
| | | | | | | | | | to latter switches. [ruby-dev:36692] * lib/optparse.rb (OptionParser#summarize): do not append unnecessary line terminator. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb (SPLAT_PROC): splat values by hand.nobu2008-12-211-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb (parse_in_order): splat values to be passed.nobu2008-12-211-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb (SPLAT_PROC): fix for regexp. [ruby-dev:37514]nobu2008-12-211-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb (OptionParser::make_switch): makes defaultnobu2008-11-181-1/+6
| | | | | | | conversion to splat. [ruby-list:45645] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb (OptionParser#make_switch): 1.9 Symbols respondmatz2008-11-081-1/+1
| | | | | | | to :match. a patch from keith cascio, <keith at ucla.edu>. [ruby-core:19730] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20149 b2dd03c8-39d4-4d8f-98ff-823fe69b080e