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

109 Коммитов

Автор SHA1 Сообщение Дата
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
nobu 39c4d6928b * lib/optparse.rb (SPLAT_PROC): splat values by hand.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-21 05:55:20 +00:00
nobu 8cd6a45a2a * lib/optparse.rb (parse_in_order): splat values to be passed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-21 05:46:01 +00:00
nobu 5ad1f1d3cd * lib/optparse.rb (SPLAT_PROC): fix for regexp. [ruby-dev:37514]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-21 03:23:19 +00:00
nobu ad5ff1c237 * lib/optparse.rb (OptionParser::make_switch): makes default
conversion to splat.  [ruby-list:45645]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-18 00:42:18 +00:00
matz 6a638cc196 * lib/optparse.rb (OptionParser#make_switch): 1.9 Symbols respond
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
2008-11-08 08:17:20 +00:00
nobu 05124e6a55 * lib/optparse.rb (ParseError.filter_backtrace): removes internal
backtrace.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-09 15:21:42 +00:00
mame a91cd48aa1 * lib/optparse.rb (summarize): separator "" should output new line.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-20 02:44:49 +00:00
nobu 45880b8e7d * lib/optparse.rb (OptionParser::ParseError#set_backtrace): omits
OptionParser internal backtraces unless debug flag is set.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-18 11:38:24 +00:00
nobu bd4c28afbd * lib/optparse.rb (OptionParser#environment): requires shellwords.
[ruby-dev:35466]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-13 21:02:28 +00:00
matz e6c1752137 * lib/rdoc.rb: massive spelling correction patch from Evan Farrar
<evanfarrar at gmail.com> in [ruby-doc:1382] applied.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-04 09:37:38 +00:00
nobu ed823523e3 * lib/optparse.rb (OptionParser::Switch::summarize): fix for long form
option with very long argument.  a patch from Kobayashi Noritada
  <nori1 AT dolphin.c.u-tokyo.ac.jp> in [ruby-list:44179].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-04 20:17:06 +00:00
nobu 5bc87779fd * lib/optparse.rb (OptionParser::List::summarize): use each_line if
defined rather than each.  [ruby-Patches-14096]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-21 21:02:13 +00:00
nobu dc8147bca9 * lib/optparse.rb: fix to override conv proc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-20 03:26:19 +00:00
ko1 2dd91facca * lib/optparse.rb: fix to override conv proc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-19 08:48:03 +00:00
nobu 0a612b8807 * lib/optparse.rb (make_switch): do not clobber converter if pattern
has no convert method.  reported by sheepman in [ruby-dev:30709].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-04-16 08:07:20 +00:00
nobu aea5a17fc4 * lib/optparse.rb (Switch#parse_arg, Switch#conv_arg): splat failures.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-12-12 14:34:26 +00:00
usa f1b36f2997 * lib/optparse.rb: cannot put :nodoc: before method definition.
put after it.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-12-08 09:13:04 +00:00
nobu 8d69c7f116 * instruby.rb (install_recursive): get rid of warning.
* lib/optparse.rb (CompletingHash#match): get rid of splat failure.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-12-04 14:49:47 +00:00
nobu 88d6c083ea * ext/extmk.rb, lib/fileutils.rb, lib/mkmf.rb, lib/optparse.rb,
lib/shellwords.rb: get rid of shadowing outer local variable.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-09 14:41:24 +00:00
nobu eba3d4587f * lib/optparse.rb (OptionParser#make_switch): pass arguments directly.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-01 14:13:16 +00:00
nobu 60a289741c * lib/optparse.rb (OptionParser::Switch#conv_arg): unsplat by
Proc#call if no conversion is given.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-29 00:57:47 +00:00
nobu 05c1ab35fc * lib/optparse.rb (parse_in_order): splat arguments to callback block.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-29 00:30:49 +00:00
nobu f3846ac51b * lib/optparse.rb (OptionParser#parse_in_order): wrong splat for
callbacks.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-26 15:49:44 +00:00
nobu 5da1743e3f * lib/optparse.rb (OptionParser#getopts): use strings as key.
fixed: [ruby-dev:29614]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-26 14:57:48 +00:00
nobu 5cb7d10ee0 * lib/optparse.rb (OptionParser#getopts): works with pre-registered
options.  [ruby-core:08826]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-12 16:14:50 +00:00
nobu 166ee9719f * lib/optparse.rb: splat parsed arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-10 00:20:03 +00:00
nobu 58b0275a4c * lib/optparse.rb: suppress `assigning void value' warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-07 23:25:56 +00:00
drbrain 52c034aecb Documentation cleanup.
Includes patches by Hugh Sasse:
* ping.rb
* weakref.rb
* mailread.rb


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-04 18:05:50 +00:00
drbrain 1210bc255c RDoc patch by Robin Stocker <robin@nibor.org>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-28 21:56:01 +00:00
matz 2ca2a4a43b * parse.y (block_param): do not use multiple assignment for a sole
block parameter.  [ruby-dev:28710]

* eval.c (rb_yield_0): pass a raw yielded value to a sole block
  parameter if a value is passed by yield.

* eval.c (proc_invoke): args may not be an array.

* eval.c (rb_proc_yield): pass original value without wrapping
  it in an array.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-21 08:08:36 +00:00
nobu 8446b6c59b * ext/extmk.rb (parse_args): provisional catch-up for the recent changes.
* lib/optparse.rb (OptionParser::List#summarize, OptionParser#order!): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-20 14:28:49 +00:00
nobu f2ded65a58 * lib/optparse.rb (OptionParser::Arguable#getopts): pass self to the
parser.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-11 14:21:08 +00:00