mirror of
https://github.com/ruby/ruby.git
synced 2025-09-21 03:24:00 +02:00
* 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:
parent
abe4ff9225
commit
1543a9f192
6 changed files with 32 additions and 1 deletions
|
@ -5,6 +5,8 @@ class TestOptionParser::OptArg < TestOptionParser
|
|||
super
|
||||
@opt.def_option("-x[VAL]") {|x| @flag = x}
|
||||
@opt.def_option("--option[=VAL]") {|x| @flag = x}
|
||||
@opt.def_option("--regexp[=REGEXP]", Regexp) {|x| @reopt = x}
|
||||
@reopt = nil
|
||||
end
|
||||
|
||||
def test_short
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue