Граф коммитов

141 Коммитов

Автор SHA1 Сообщение Дата
stomar e9d6c6716f nodoc OptParse
* lib/optparse.rb: [DOC] nodoc OptParse, introduced with r46126,
  to avoid leaking of its documentation (OptionParser's docs) into
  the class documentation of Object.  [ruby-core:79909] [Bug #13281]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-04 19:52:30 +00:00
nobu 99ad512486 optparse.rb: hyphenize
* lib/optparse.rb (make_switch, parse_in_order): unify underscores
  to hyphens.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-14 08:20:26 +00:00
nobu 89e11e8833 optparse.rb: fix quote [ci skip]
* lib/optparse.rb (getopts): [DOC] fix missing quote.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-05 09:54:13 +00:00
nobu dd1be236d9 optparse.rb: fix char class option
* lib/optparse.rb (OptionParser::Completion.candidate): get rid of
  nil as key names.  [ruby-core:75773] [Bug #12438]
* lib/optparse.rb (OptionParser#make_switch): char class option
  cannot be NoArgument, default to RequiredArgument.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-31 08:28:48 +00:00
nobu e82df08b9f optparse.rb: no duplicate strings
* lib/optparse.rb (OptionParser#parse_in_order): get rid of making
  duplicate strings; $1 and others make a new string each times.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-31 08:26:30 +00:00
nobu 38b756501f optparse.rb: [DOC] fix example code [ci skip]
* 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
2016-04-28 07:33:43 +00:00
nobu 6860034546 get rid of ruby-mode.el bugs
* 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
2016-02-06 11:51:40 +00:00
nobu 49684589cd optparse.rb: into kwdarg
* 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
2016-01-06 08:23:10 +00:00
a_matsuda 3a05da1321 [DOC] Fix typos
* 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
2015-12-23 03:43:23 +00:00
naruse 3e92b635fb Add frozen_string_literal: false for all files
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
2015-12-16 05:07:31 +00:00
nobu c84e62cd32 optparse.rb: Fix typo [ci skip]
* 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
2015-12-08 01:19:04 +00:00
nobu ec1d232f10 fix typo in OptionParser#complete docs [ci skip]
* 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
2015-07-21 04:36:57 +00:00
nobu 9b37b750bd Fix typo in optparse library [ci skip] [Fix GH-956]
* lib/optparse.rb: [DOC] Fix typo.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-05 14:54:12 +00:00
nobu 031c46f83a optparse.rb: update --version example [ci skip]
* 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
2015-02-08 15:26:11 +00:00
hsbt ae0e680769 * lib/optparse.rb: improvements for OptionParser documentation.
[misc #10608][ruby-core:66901][ci skip]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-12 04:37:12 +00:00
nobu 9d3890ab90 optparse.rb: getopts message improvement
* 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
2014-07-21 06:55:44 +00:00
hsbt 4f7449beba * lib/gserver.rb: remove redundant use of to_s in interpolation.
* 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
2014-06-24 08:48:46 +00:00
nobu eecf8b71b9 lib/optionparser.rb
* 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
2014-05-26 03:25:38 +00:00
zzak a9625a2f8a * lib/optparse.rb: [DOC] Add example of generating help with optparse.
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
2014-02-27 09:01:43 +00:00
nobu c26bc976bd optparse.rb: regexp at lhs
* 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
2013-11-28 07:34:15 +00:00
nobu d1f2021b07 optparse.rb: remove $Id$
* 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
2013-09-08 12:37:29 +00:00
drbrain ee155140e8 * lib/optparse.rb: The Integer acceptable now allows binary and
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
2013-09-05 05:02:17 +00:00
zzak ba84738d44 * lib/optparse.rb: nodoc Object::Version and SPLAT_PROC
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-19 18:36:37 +00:00
ktsj edb98f8b91 fix typos. Patch by k_takata.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-19 03:10:21 +00:00
zzak 78c56ae584 * lib/optparse.rb: Documentation for OptionParser to remove 'shadowed
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
2012-12-22 16:36:30 +00:00
zzak c60e45f100 * lib/optparse.rb: Remove 'developer documentation' section from rdoc
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
2012-12-17 17:44:34 +00:00
zzak 92300037ad * lib/optparse.rb: Remove unreachable email address from documentation
[Bug #6996] [ruby-core:47459]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-13 02:25:37 +00:00
nobu 3c2f707f16 * lib/optparse.rb (OptionParser#to_a): split for each lines.
[ruby-dev:45568][Bug #6348]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-24 20:46:14 +00:00
naruse dd5ae05b05 * lib/optparse.rb (OptionParser#to_a): should split by end-of-line,
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
2012-04-24 12:17:05 +00:00
nobu 4f2b00429e * lib/optparse.rb (OptionParser#to_a): should split by end-of-line
[ruby-dev:45568][Bug #6348]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-24 06:51:44 +00:00
nobu a9917efd5d * lib/optparse.rb (OptionParser#to_a): String#to_a is no longer
defined.  [ruby-dev:45568][Bug #6348]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-24 05:54:08 +00:00
nobu de1e4881d4 * lib/optparse.rb (Regexp): fix incorrect options when casting to
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
2012-01-16 07:42:01 +00:00
drbrain ae4afa5a4e * lib/optparse.rb: Add link to make_switch to improve documentation.
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
2011-05-16 21:57:22 +00:00
kazu 0924e52c24 * lib/optparse.rb (OptionParser#compsys): escape brackets too.
[ruby-dev:42754]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-26 23:30:33 +00:00
kazu 89c7efed6f * misc/rb_optparse.zsh: update how to install.
* 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
2010-12-12 11:40:29 +00:00
nobu 11ef87461a * lib/optparse.rb (OptionParser::Officious): separate completion
options from --help.  [ruby-dev:42690]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-07 13:31:11 +00:00
nobu ff1fb42734 * lib/optparse.rb (OptionParser::Completion#candidate),
(OptionParser::Switch#compsys): remove unused variables.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-07 13:29:49 +00:00
nobu 76c286d195 * lib/optparse.rb (OptionParser#candidate): skip separators.
* 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
2010-12-06 13:47:19 +00:00
shugo 2381984069 * lib/optparse.rb (OptionParser#candidate): : was missing. Thanks,
Shota Fukumori.  [ruby-dev:42634]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-27 05:01:13 +00:00
nobu 7050069d80 * lib/optparse.rb (OptionParser#candidate): get rid of 1.9 syntax
so that BASERUBY can be 1.8.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-27 02:29:26 +00:00
nobu 91c0ff4f7d * lib/optparse.rb: shell completion support for zsh. based on
<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
2010-11-19 12:07:09 +00:00
nobu 644f0445e8 * lib/optparse.rb: shell completion support for bash.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-19 11:26:54 +00:00
akr e6f6033b16 * lib/optparse.rb: suppress a warning.
* test/test_mutex_m.rb: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-10 12:02:52 +00:00
nobu b1b3e13570 * lib/optparse.rb (Numeric): accept rationals.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-29 09:10:12 +00:00
nobu c9dd4823d9 * lib: fixed typo. a patch by Sho Hashimoto in [ruby-dev:40716].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-20 03:30:59 +00:00
nobu a20f1713c3 * lib/optparse.rb (OptionParser#parse_in_order): do not make an
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
2009-04-26 06:13:11 +00:00
nobu 287a34ae0d * {ext,lib,test}/**/*.rb: removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-06 03:56:38 +00:00
nobu d99eeabea6 * lib/optparse.rb (Switch#summarize): strips an equal sign from
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
2009-02-01 07:10:08 +00:00
nobu de398e8f61 * lib/optparse.rb (List#accept, parse_in_order): n option is no
longer needed.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-31 09:03:43 +00:00
nobu 0a23fe6572 * lib/optparse.rb (OptionParser::List#summarize): gives priority
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
2008-12-26 06:50:55 +00:00