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

158 Коммитов

Автор SHA1 Сообщение Дата
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
nobu b55f60b59f * lib/optparse.rb (OptionParser#getopts): new methods.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-10 23:31:32 +00:00
nobu 3e5f70a815 * math.c (log2): may be a macro.
* parse.y (args, block_param, f_args): pass f_post_arg to #params.

* util.c (powersOf10): constified.

* ext/readline/readline.c: include extconf.h first.

* ext/ripper/eventids2.c: removed tLAMBDA_ARG.

* ext/tk/tcltklib.c (lib_fromUTF8_core): removed conflict.

* ext/tk/tkutil/tkutil.c (cbsubst_get_subst_arg): rb_id2name() is
  defined as const now.

* ext/win32ole/win32ole.c (fole_missing): ditto.

* lib/mkmf.rb (create_makefile): force to create extconf header.

* lib/optparse.rb (order!): use Proc#yield.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-09 23:18:04 +00:00
matz 9b383bd6cf * sprintf.c (rb_str_format): allow %c to print one character
string (e.g. ?x).

* lib/tempfile.rb (Tempfile::make_tmpname): put dot between
  basename and pid.  [ruby-talk:196272]
* parse.y (do_block): remove -> style block.

* parse.y (parser_yylex): remove tLAMBDA_ARG.

* eval.c (rb_call0): binding for the return event hook should have
  consistent scope.  [ruby-core:07928]

* eval.c (proc_invoke): return behavior should depend whether it
  is surrounded by a lambda or a mere block.

* eval.c (formal_assign): handles post splat arguments.

* eval.c (rb_call0): ditto.

* st.c (strhash): use FNV-1a hash.

* parse.y (parser_yylex): removed experimental ';;' terminator.

* eval.c (rb_node_arity): should be aware of post splat arguments.

* eval.c (rb_proc_arity): ditto.

* parse.y (f_args): syntax rule enhanced to support arguments
  after the splat.

* parse.y (block_param): ditto for block parameters.

* parse.y (f_post_arg): mandatory formal arguments after the splat
  argument.

* parse.y (new_args_gen): generate nodes for mandatory formal
  arguments after the splat argument.

* eval.c (rb_eval): dispatch mandatory formal arguments after the
  splat argument.

* parse.y (args): allow more than one splat in the argument list.

* parse.y (method_call): allow aref [] to accept all kind of
  method argument, including assocs, splat, and block argument.

* eval.c (SETUP_ARGS0): prepare block argument as well.

* lib/mathn.rb (Integer): remove Integer#gcd2. [ruby-core:07931]

* eval.c (error_line): print receivers true/false/nil specially.

* eval.c (rb_proc_yield): handles parameters in yield semantics.

* eval.c (nil_yield): gives LocalJumpError to denote no block
  error.

* io.c (rb_io_getc): now takes one-character string.

* string.c (rb_str_hash): use FNV-1a hash from Fowler/Noll/Vo
  hashing algorithm.

* string.c (rb_str_aref): str[0] now returns 1 character string,
  instead of a fixnum.	[Ruby2]

* parse.y (parser_yylex): ?c now returns 1 character string,
  instead of a fixnum.	[Ruby2]

* string.c (rb_str_aset): no longer support fixnum insertion.

* eval.c (umethod_bind): should not update original class.
  [ruby-dev:28636]

* eval.c (ev_const_get): should support constant access from
  within instance_eval().  [ruby-dev:28327]

* time.c (time_timeval): should round for usec floating
  number.  [ruby-core:07896]

* time.c (time_add): ditto.

* dir.c (sys_warning): should not call a vararg function
  rb_sys_warning() indirectly.	[ruby-core:07886]

* numeric.c (flo_divmod): the first element of Float#divmod should
  be an integer. [ruby-dev:28589]

* test/ruby/test_float.rb: add tests for divmod, div, modulo and remainder.

* re.c (rb_reg_initialize): should not allow modifying literal
  regexps.  frozen check moved from rb_reg_initialize_m as well.

* re.c (rb_reg_initialize): should not modify untainted objects in
  safe levels higher than 3.

* re.c (rb_memcmp): type change from char* to const void*.

* dir.c (dir_close): should not close untainted dir stream.

* dir.c (GetDIR): add tainted/frozen check for each dir operation.

* lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_symbol_arg):
  typo fixed.  a patch from Florian Gross <florg at florg.net>.

* eval.c (EXEC_EVENT_HOOK): trace_func may remove itself from
  event_hooks.	no guarantee for arbitrary hook deletion.
  [ruby-dev:28632]

* util.c (ruby_strtod): differ addition to minimize error.
  [ruby-dev:28619]

* util.c (ruby_strtod): should not raise ERANGE when the input
  string does not have any digits.  [ruby-dev:28629]

* eval.c (proc_invoke): should restore old ruby_frame->block.
  thanks to ts <decoux at moulon.inra.fr>.  [ruby-core:07833]
  also fix [ruby-dev:28614] as well.

* signal.c (trap): sig should be less then NSIG.  Coverity found
  this bug.  a patch from Kevin Tew <tewk at tewk.com>.
  [ruby-core:07823]

* math.c (math_log2): add new method inspired by
  [ruby-talk:191237].

* math.c (math_log): add optional base argument to Math::log().
  [ruby-talk:191308]

* ext/syck/emitter.c (syck_scan_scalar): avoid accessing
  uninitialized array element.	a patch from Pat Eyler
  <rubypate at gmail.com>.  [ruby-core:07809]

* array.c (rb_ary_fill): initialize local variables first.  a
  patch from Pat Eyler <rubypate at gmail.com>.	 [ruby-core:07810]

* ext/syck/yaml2byte.c (syck_yaml2byte_handler): need to free
  type_tag.  a patch from Pat Eyler <rubypate at gmail.com>.
  [ruby-core:07808]

* ext/socket/socket.c (make_hostent_internal): accept ai_family
  check from Sam Roberts <sroberts at uniserve.com>.
  [ruby-core:07691]

* util.c (ruby_strtod): should not cut off 18 digits for no
  reason.  [ruby-core:07796]

* array.c (rb_ary_fill): internalize local variable "beg" to
  pacify Coverity.  [ruby-core:07770]

* pack.c (pack_unpack): now supports CRLF newlines.  a patch from
  <tommy at tmtm.org>.	[ruby-dev:28601]

* applied code clean-up patch from Stefan Huehner
  <stefan at huehner.org>.  [ruby-core:07764]

* lib/jcode.rb (String::tr_s): should have translated non
  squeezing character sequence (i.e. a character) as well.  thanks
  to Hiroshi Ichikawa <gimite at gimite.ddo.jp> [ruby-list:42090]

* ext/socket/socket.c: document update patch from Sam Roberts
  <sroberts at uniserve.com>.  [ruby-core:07701]

* lib/mathn.rb (Integer): need not to remove gcd2.  a patch from
  NARUSE, Yui <naruse at airemix.com>.	[ruby-dev:28570]

* parse.y (arg): too much NEW_LIST()

* eval.c (SETUP_ARGS0): remove unnecessary access to nd_alen.

* eval.c (rb_eval): use ARGSCAT for NODE_OP_ASGN1.
  [ruby-dev:28585]

* parse.y (arg): use NODE_ARGSCAT for placeholder.

* lib/getoptlong.rb (GetoptLong::get): RDoc update patch from
  mathew <meta at pobox.com>.  [ruby-core:07738]

* variable.c (rb_const_set): raise error when no target klass is
  supplied.  [ruby-dev:28582]

* prec.c (prec_prec_f): documentation patch from
  <gerardo.santana at gmail.com>.  [ruby-core:07689]

* bignum.c (rb_big_pow): second operand may be too big even if
  it's a Fixnum.  [ruby-talk:187984]

* README.EXT: update symbol description.  [ruby-talk:188104]

* COPYING: explicitly note GPLv2.  [ruby-talk:187922]

* parse.y: remove some obsolete syntax rules (unparenthesized
  method calls in argument list).

* eval.c (rb_call0): insecure calling should be checked for non
  NODE_SCOPE method invocations too.

* eval.c (rb_alias): should preserve the current safe level as
  well as method definition.

* process.c (rb_f_sleep): remove RDoc description about SIGALRM
  which is not valid on the current implementation. [ruby-dev:28464]

 Thu Mar 23 21:40:47 2006  K.Kosako  <sndgk393 AT ybb.ne.jp>

* eval.c (method_missing): should support argument splat in
  super.  a bug in combination of super, splat and
  method_missing.  [ruby-talk:185438]

* configure.in: Solaris SunPro compiler -rapth patch from
  <kuwa at labs.fujitsu.com>.  [ruby-dev:28443]

* configure.in: remove enable_rpath=no for Solaris.
  [ruby-dev:28440]

* ext/win32ole/win32ole.c (ole_val2olevariantdata): change behavior
  of converting  OLE Variant object with VT_ARRAY|VT_UI1 and Ruby
  String object.

* ruby.1: a clarification patch from David Lutterkort
  <dlutter at redhat.com>.  [ruby-core:7508]

* lib/rdoc/ri/ri_paths.rb (RI::Paths): adding paths from rubygems
  directories.	a patch from Eric Hodel <drbrain at segment7.net>.
  [ruby-core:07423]

* eval.c (rb_clear_cache_by_class): clearing wrong cache.

* ext/extmk.rb: use :remove_destination to install extension libraries
  to avoid SEGV.  [ruby-dev:28417]

* eval.c (rb_thread_fd_writable): should not re-schedule output
  from KILLED thread (must be error printing).

* array.c (rb_ary_flatten_bang): allow specifying recursion
  level.  [ruby-talk:182170]

* array.c (rb_ary_flatten): ditto.

* gc.c (add_heap): a heap_slots may overflow.  a patch from Stefan
  Weil <weil at mail.berlios.de>.

* eval.c (rb_call): use separate cache for fcall/vcall
  invocation.

* eval.c (rb_eval): NODE_FCALL, NODE_VCALL can call local
  functions.

* eval.c (rb_mod_local): a new method to specify newly added
  visibility "local".

* eval.c (search_method): search for local methods which are
  visible only from the current class.

* class.c (rb_class_local_methods): a method to list local methods.

* object.c (Init_Object): add BasicObject class as a top level
  BlankSlate class.

* ruby.h (SYM2ID): should not cast to signed long.
  [ruby-core:07414]

* class.c (rb_include_module): allow module duplication.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-09 21:20:17 +00:00
matz 5675cdbd41 * eval.c: unify ruby_class (for method definition) and ruby_cbase
(for constant reference).

* eval.c (rb_call0): use TMP_ALLOC() instead of allocating
  a temporary array object.

* eval.c (eval): need not to protect $SAFE value.
  [ruby-core:07177]

* error.c (Init_Exception): change NameError to direct subclass of
  Exception so that default rescue do not handle it silently.

* struct.c (rb_struct_select): update RDoc description.
  [ruby-core:7254]

* numeric.c (int_upto): return an enumerator if no block is
  attached to the method.

* numeric.c (int_downto): ditto.

* numeric.c (int_dotimes): ditto.

* enum.c (enum_first): new method Enumerable#first to take first n
  element from an enumerable.

* enum.c (enum_group_by): new method Enumerable#group_by that
  groups enumerable values according to their block values.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-02-03 09:15:42 +00:00
nobu c3144a39a7 * lib/optparse.rb (CompletingHash#match): fix for 1.9.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-27 15:00:21 +00:00
nobu e8a83b54cb * lib/optparse.rb: match incomplete (in current enconding) multibyte
string.  http://inamode6.tokuhirom.dnsalias.org/show/1551


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-11-22 14:53:16 +00:00
matz 22f1926644 * range.c (rb_range_beg_len): should return Qfalse for non-range
object.

* pack.c (EXTEND16): [ruby-dev:27383]

* eval.c (set_trace_func): add rb_secure(4) to prevent adding
  tracing function.

* lib/delegate.rb: document update from James Edward Gray II
  <james@grayproductions.net>.  [ruby-core:05942]

* process.c (proc_daemon): should restrict execution on levels
  higher than $SAFE=2.  suggested by URABE Shyouhei
  <shyouhei@ice.uec.ac.jp>.

* lib/forwardable.rb: replaced by new implementation from
  <Daniel.Berger@qwest.com>.  [ruby-core:05899]

* file.c (path_check_0): disallow sticky world writable directory
  in PATH (and $LOAD_PATH).  [ruby-dev:27226]

* numeric.c (fix_idiv): 1.div(1.0) should return integer value.
  [ruby-dev:27235]

* lib/yaml.rb: require 'yaml/constants'.  [ruby-core:5776]

* lib/xmlrpc/client.rb (XMLRPC::Client::do_rpc): add charset
  information to content-type header.[ruby-core:5127]

* lib/xmlrpc/server.rb (CGIServer::serve): ditto.

* lib/xmlrpc/server.rb (ModRubyServer::serve): ditto.

* lib/xmlrpc/server.rb (WEBrickServlet::service): ditto.

* test/dbm/test_dbm.rb (TestDBM::test_s_open_error): remove
  test_s_open_error test to detect duplicate open.
  [ruby-dev:27202]

* eval.c (splat_value): use to_a to splat non Array object.

* object.c (nil_to_a): remove nil.to_a.  [experimental]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-10-05 16:15:16 +00:00
nobu 7aefa8e580 *** empty log message ***
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-26 12:44:47 +00:00
nobu cd5a5a30c0 * lib/optparse.rb (RequiredArgument#parse): not consume unmatched
argument.  fixed [ruby-dev:27316]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-25 22:56:15 +00:00
nobu 898c734378 * lib/optparse.rb (default_argv, Arguable#options): defaults strings
to be parsed to Arguable instance.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-09-20 22:45:06 +00:00
nobu abdb27bf16 * lib/optparse.rb (OptionParser#order!): delete debug output.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-13 13:24:59 +00:00
nobu 4eede6b4a1 * lib/optparse.rb (OptionParser#order!): call handlers iff matches
non-switch.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-13 13:12:24 +00:00
nobu bea190a1fc * lib/optparse.rb (OptionParser#make_switch, OptionParser#order!):
added non-option and end-of-args handler.  [ruby-talk:136878]
  (EXPERIMENTAL


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-04-12 10:30:45 +00:00
nobu af3da7d124 * lib/optparse.rb (OptionParser::Completion#complete): new parameter
to direct case insensitiveness.

* lib/optparse.rb (OptionParser#order!): ignore case only for long
  option.  [ruby-dev:25048]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-05 10:39:58 +00:00
nobu 4c718c753e * lib/optparse.rb (OptionParser::Officious): moved from DefaultList.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-09 05:27:58 +00:00
nobu 4a56a0ef5d * lib/optparse.rb (OptionParser#warn, OptionParser#abort): Exception
no longer has to_str method.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-15 14:54:01 +00:00
matz ce44928d2b * error.c (Init_Exception): remove Exception#to_str. [Ruby2]
* eval.c (error_print): should no call "to_str" anymore use
  "message" method instead.

* io.c (rb_f_open): Kernel#open() calls "to_open" if the first
  argument responds to it. [Ruby2]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-05 15:55:09 +00:00
matz aab1ba1365 * eval.c (rb_require_safe): preserve old ruby_errinfo.
[ruby-talk:95409]

* eval.c (rb_f_raise): should not clear backtrace information if
  exception object already have one.

* parse.y (assoc_list): allow {sym: val} style Hash. [Ruby2]
  this change is done by Nobuyoshi Nakada <nobu@ruby-lang.org>.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-20 16:45:41 +00:00
gsinclair f42c729a2e * lib/optparse.rb: Improved documentation.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-28 17:31:10 +00:00
gsinclair fd4a3ee4ac * lib/optparse.rb: incomplete RDoc documentation added in place of
existing RD comments.  Tabs converted to spaces.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-23 13:27:42 +00:00
nobu 07507fe37a * lib/optparse.rb (OptionParser::Completion::complete): wrong
Regexp for word boundary.  pointed out by Gavin Sinclair.

* lib/optparse.rb (OptionParser::make_switch): [no-] prefix was
  missing.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-20 07:07:19 +00:00
nobu bc94ec8f4c * lib/optparse.rb (OptionParser::Completion::complete): allow least
common completion for three or more candidates.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-17 01:50:31 +00:00
nobu 87bb4b5468 * lib/optparse.rb (OptionParser::Completion#complete): prior shorter
name to containing longer name.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-13 02:31:17 +00:00
nobu 2a40bbeea0 * lib/optparse.rb (OptionParser::Completion#complete): default not to
ignore case on completion.  [ruby-talk:84726]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-06 02:01:23 +00:00
nobu 4dada1c8a2 * lib/optparse.rb (OptionParser::Switch::PlacedArgument::parse):
do not remove next argument if empty value is placed.

* test/optparse: added.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-05 10:09:58 +00:00
matz 525336fcc9 * eval.c (proc_invoke): single array value to normal Proc#call
(i.e. not via lambda call), should be treated just like yield.
  [ruby-dev:21726]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-29 17:47:24 +00:00
nobu 22bb1debf9 * lib/optparse.rb, lib/optparse/version.rb: search also all
capital versions.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-08 11:00:17 +00:00
nobu 44785befea * lib/optparse.rb (OptionParser#order, #permute, #parse): allow an
array as argument.

* test/ruby/test_*.rb: moved invariants to left side in
  assert_equal, and use assert_nil, assert_raises and so on.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-05 15:15:43 +00:00
nobu 73e4384a23 * lib/optparse.rb (--version): fix assignment/reference order.
* lib/optparse.rb (OptionParser#help): new; OptionParser#to_s may
  be deprecated in future.

* lib/optparse/version.rb (OptionParser#show_version): hide Object.

* test/runner.rb: fix optparse usage.

* test/runner.rb: glob all testsuits if no tests given.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-05 02:32:24 +00:00
nobu 89c73f237e * lib/optparse.rb: --version takes an optional argument; "all" or a list of package names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-31 03:25:11 +00:00
nobu e06379839c removed garbage
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-18 06:34:49 +00:00
matz 909c2274f9 * eval.c (rb_f_missing): VCALL is called only for LOCAL_ID. no
check required.

* parse.y (primary): pritmary:tFID generates NODE_FCALL.
  [ruby-dev:20641]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-18 05:29:46 +00:00
matz 590a37880c * eval.c (proc_alloc): re-unification of Block and Proc. Block
class is no longer available.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-16 07:14:50 +00:00
matz c5fc4bca6d * eval.c (rb_call_super): inheritance line adjustment moved from
rb_call(). [ruby-core:01113]

* eval.c (rb_eval): use rb_call_super() to follow DRY principle.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-03 09:40:21 +00:00
matz 6125313d69 * array.c (push_values_at): Array#values_at should work with
ranges too.

* range.c (rb_range_beg_len): length calculation was wrong.

* eval.c (rb_call): should set T_ICLASS in the frame->last_class.
  [ruby-core:01110]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-02 04:49:46 +00:00
nobu 1ce0018ba1 remove conflict
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-30 16:50:41 +00:00
matz 979f006b9e * io.c (rb_f_syscall): type dispatch should be based on
rb_check_string_type(), not FIXNUM_P(), because values may be a
  bignum.  [ruby-talk:72257]

* eval.c (rb_call0): should pass the current klass value to
  block_invoke, which may be called via "super". [ruby-core:01077]

* eval.c (block_invoke): now takes 4th argument "klass".

* eval.c (block_alloc): should propagate BLOCK_PROC to
  ruby_block.

* marshal.c (r_object0): should not use "yield" method, use "call"
  instead. (ruby-bugs-ja PR#476)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-30 16:08:03 +00:00
nobu 7d9628ef02 * eval.c (rb_Array): exclude Kernel#to_a instead of Object#to_a.
(ruby-bugs-ja:PR#483)

* lib/optparse.rb (OptionParser::Switch#parse_arg): not splat.

* lib/optparse.rb (OptionParser::Switch#conv_arg): splat if no
  conversion supplied.

* lib/optparse.rb (OptionParser::Switch::PlacedArgument#parse):
  override next switch after argument conversion.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-30 05:55:50 +00:00
nobu 4ca5e66ee7 backout
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-29 21:35:50 +00:00
nobu 5ddce4f7bc * eval.c (ev_const_defined, ev_const_get), variable.c
(rb_const_get_at, rb_const_get, rb_mod_remove_const): use Qundef
  as autoload marker.  [ruby-dev:18103], [ruby-dev:18184]

* eval.c (rb_mod_autoload, rb_mod_autoload_p): new method;
  Module#autoload, Module#autoload?.

* variable.c (rb_autoload, rb_autoload_load, rb_autoload_p):
  manage autoload constants per classes/modules.

* variable.c (rb_const_defined_at, rb_const_defined): return false
  for autoloading constants.

* class.c (rb_define_class, rb_define_module), eval.c (rb_eval),
  variable.c (rb_mod_const_at, rb_const_assign): removed autoload
  stuff.

* intern.h: prototypes; rb_autoload, rb_autoload_load,
  rb_autoload_p.

* lib/optparse.rb (OptionParser::Switch::PlacedArgument::parse):
  do not treat unmatched argument as an option.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-29 00:11:11 +00:00
nobu 7712407048 * lib/mkmf.rb, lib/optparse.rb, lib/tracer.rb: use Method#to_block
instead of deprecated Method#to_proc.  (ruby-bugs-ja:PR#477)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-26 13:17:07 +00:00
nobu 6e242d868e * lib/optparse.rb (OptionParser::Switch::parse,
OptionParser::order): use {Block,Proc}#call instead of deprecated
  #yield.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-26 12:21:24 +00:00
nobu 564c80b10a * lib/optparse.rb: get rid of warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-21 04:27:06 +00:00
akr 0977fe1705 * instruby.rb, ext/extmk.rb, lib/benchmark.rb, lib/cgi.rb,
lib/debug.rb, lib/getoptlong.rb, lib/optparse.rb, lib/time.rb,
  lib/date/format.rb, lib/irb/ruby-lex.rb lib/uri/common.rb: revert
  escape for `-' in character class.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-29 06:39:50 +00:00
nobu 8478ba513f backout
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-26 06:23:17 +00:00
akr e689d077e3 * lib/optparse.rb, lib/jcode.rb, ext/tk/lib/tk.rb: reorder character
class /[\]\[]/ to /[\[\]]/ to readability.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-22 04:31:24 +00:00
akr 58ef7c2088 * regex.c (re_compile_pattern): fix previous change.
* instruby.rb, ext/extmk.rb, ext/tk/lib/tk.rb, lib/benchmark.rb,
  lib/cgi.rb, lib/debug.rb, lib/getoptlong.rb, lib/jcode.rb,
  lib/optparse.rb, lib/time.rb, lib/date/format.rb,
  lib/irb/ruby-lex.rb: escape `[', `]', `-' in chracter class in
  regexp to avoid warning.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-21 15:13:23 +00:00
nobu eac185d848 *** empty log message ***
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-20 09:33:40 +00:00
nobu d666a5183c * lib/optparse.rb (OptionParser#order!): follow recent change
of proc argument.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-03-20 09:31:41 +00:00
nobu e13bfb1509 * lib/optparse.rb (OptionParser::make_switch): NoArgument doesn't
override other styles.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-31 00:41:40 +00:00
nobu 1c37352f8a * lib/optparse.rb (OptionParser::List::accept): default
pattern must not be nil.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-01-30 17:50:37 +00:00