1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/optparse.rb (String): must provide conversion block.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2002-08-08 00:38:28 +00:00
parent 8a7fbc6fec
commit 8f6b1e000a
2 changed files with 5 additions and 6 deletions

View file

@ -1,10 +1,9 @@
Thu Aug 8 08:29:37 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* lib/optparse.rb (OptionParser::Switch::parse_arg): require block
always.
Thu Aug 8 09:37:02 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* lib/optparse.rb (NilClass): must provide conversion block.
* lib/optparse.rb (String): ditto.
Wed Aug 7 22:12:54 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* lib/optparse.rb (OptionParser::Completion::convert): returned

View file

@ -210,7 +210,7 @@ Individual switch class.
=end #'#"#`#
def parse(arg, *val)
if block
val = conv.yield(*val)
val = conv.yield(*val) if conv
return arg, block, val
else
return arg, nil
@ -1291,7 +1291,7 @@ Default options, which never appear in option summary.
: String
any none-empty string, and no conversion.
=end #'#"#`#
accept(String, /.+/)
accept(String, /.+/) {|s,*|s}
=begin
: Integer