* 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/branches/ruby_1_9_3@34316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-01-16 07:42:01 +00:00
parent abe4ff9225
commit 1543a9f192
6 changed files with 32 additions and 1 deletions

View file

@ -7,6 +7,8 @@ module TestOptionParser::ReqArg
super
@opt.def_option("-xVAL") {|x| @flag = x}
@opt.def_option("--option=VAL") {|x| @flag = x}
@opt.def_option("--regexp=REGEXP", Regexp) {|x| @reopt = x}
@reopt = nil
end
end
class Def2 < TestOptionParser