aboutsummaryrefslogtreecommitdiffstats
path: root/lib/optparse.rb
Commit message (Collapse)AuthorAgeFilesLines
* * lib/optparse.rb (OptionParser::Completion#complete): new parameternobu2004-12-051-17/+12
| | | | | | | | | | 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
* * lib/optparse.rb (OptionParser::Officious): moved from DefaultList.nobu2004-11-091-20/+52
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb (OptionParser#warn, OptionParser#abort): Exceptionnobu2004-07-151-2/+2
| | | | | | | no longer has to_str method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * error.c (Init_Exception): remove Exception#to_str. [Ruby2]matz2004-04-051-2/+0
| | | | | | | | | | | * 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
* * eval.c (rb_require_safe): preserve old ruby_errinfo.matz2004-03-201-1/+1
| | | | | | | | | | | | | [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
* * lib/optparse.rb: Improved documentation.gsinclair2003-12-281-262/+256
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb: incomplete RDoc documentation added in place ofgsinclair2003-12-231-307/+406
| | | | | | | existing RD comments. Tabs converted to spaces. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb (OptionParser::Completion::complete): wrongnobu2003-12-201-2/+2
| | | | | | | | | | 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
* * lib/optparse.rb (OptionParser::Completion::complete): allow leastnobu2003-11-171-4/+11
| | | | | | | common completion for three or more candidates. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb (OptionParser::Completion#complete): prior shorternobu2003-11-131-13/+19
| | | | | | | name to containing longer name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb (OptionParser::Completion#complete): default not tonobu2003-11-061-2/+12
| | | | | | | ignore case on completion. [ruby-talk:84726] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb (OptionParser::Switch::PlacedArgument::parse):nobu2003-11-051-1/+1
| | | | | | | | | 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
* * eval.c (proc_invoke): single array value to normal Proc#callmatz2003-10-291-0/+1
| | | | | | | | (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
* * lib/optparse.rb, lib/optparse/version.rb: search also allnobu2003-09-081-2/+2
| | | | | | | capital versions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb (OptionParser#order, #permute, #parse): allow annobu2003-09-051-2/+15
| | | | | | | | | | 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
* * lib/optparse.rb (--version): fix assignment/reference order.nobu2003-09-051-4/+5
| | | | | | | | | | | | | | * 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
* * lib/optparse.rb: --version takes an optional argument; "all" or a list of ↵nobu2003-08-311-4/+13
| | | | | | package names. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* removed garbagenobu2003-07-181-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_f_missing): VCALL is called only for LOCAL_ID. nomatz2003-07-181-1/+1
| | | | | | | | | | 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
* * eval.c (proc_alloc): re-unification of Block and Proc. Blockmatz2003-06-161-15/+15
| | | | | | | class is no longer available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_call_super): inheritance line adjustment moved frommatz2003-06-031-1/+1
| | | | | | | | | 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
* * array.c (push_values_at): Array#values_at should work withmatz2003-06-021-1/+1
| | | | | | | | | | | | 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
* remove conflictnobu2003-05-301-12/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_f_syscall): type dispatch should be based onmatz2003-05-301-0/+12
| | | | | | | | | | | | | | | | | | | 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
* * eval.c (rb_Array): exclude Kernel#to_a instead of Object#to_a.nobu2003-05-301-16/+21
| | | | | | | | | | | | | | | (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
* backoutnobu2003-05-291-5/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (ev_const_defined, ev_const_get), variable.cnobu2003-05-291-9/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | (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
* * lib/mkmf.rb, lib/optparse.rb, lib/tracer.rb: use Method#to_blocknobu2003-05-261-3/+3
| | | | | | | 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
* * lib/optparse.rb (OptionParser::Switch::parse,nobu2003-05-261-3/+3
| | | | | | | | 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
* * lib/optparse.rb: get rid of warnings.nobu2003-05-211-11/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * instruby.rb, ext/extmk.rb, lib/benchmark.rb, lib/cgi.rb,akr2003-03-291-6/+6
| | | | | | | | | 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
* backoutnobu2003-03-261-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb, lib/jcode.rb, ext/tk/lib/tk.rb: reorder characterakr2003-03-221-3/+3
| | | | | | | class /[\]\[]/ to /[\[\]]/ to readability. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * regex.c (re_compile_pattern): fix previous change.akr2003-03-211-9/+9
| | | | | | | | | | | * 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
* *** empty log message ***nobu2003-03-201-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb (OptionParser#order!): follow recent changenobu2003-03-201-1/+1
| | | | | | | of proc argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb (OptionParser::make_switch): NoArgument doesn'tnobu2003-01-311-4/+12
| | | | | | | override other styles. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb (OptionParser::List::accept): defaultnobu2003-01-301-1/+1
| | | | | | | pattern must not be nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb (OptionParser::Switch::PlacedArgument): added.nobu2003-01-301-24/+41
| | | | | | | | | | | | | if the next argument doesn't start with '-', use it as the value. * lib/optparse.rb (OptionParser::make_switch): fixed a bug of pattern. * lib/optparse.rb (Array): no need to guard. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* renamed OptionParser#new to #define.nobu2002-12-021-9/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb (OptionParser::new): same as OptionParser#on butnobu2002-12-011-7/+23
| | | | | | | returns new OptionParser::switch. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3104 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use Object#class instead of deprecated Object#type.nobu2002-10-021-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb (String): must provide conversion block.nobu2002-08-081-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/optparse.rb (OptionParser::Switch::parse_arg): require blocknobu2002-08-071-2/+2
| | | | | | | | | always. * lib/optparse.rb (NilClass): must provide conversion block. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * optparse.rb (OptionParser::Completion::convert): returned allnobu2002-08-071-7/+7
| | | | | | | | | | | values not first one. * optparse.rb (OptionParser::Switch::parse): return values as is. * optparse.rb (OptionParser::order): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/resolv.rb (Resolv::DNS::open, close): new.nobu2002-07-121-0/+1605
* lib/optparse.rb, lib/optparse: import. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e