[前][次][番号順一覧][スレッド一覧]

ruby-changes:66939

From: Nobuyoshi <ko1@a...>
Date: Wed, 28 Jul 2021 20:14:28 +0900 (JST)
Subject: [ruby-changes:66939] bf175e7ec2 (master): [ruby/optparse] nodoc private methods

https://git.ruby-lang.org/ruby.git/commit/?id=bf175e7ec2

From bf175e7ec20a1ea3e81b906074a6829b9cc34335 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Mon, 12 Apr 2021 02:02:11 +0900
Subject: [ruby/optparse] nodoc private methods

https://github.com/ruby/optparse/commit/f23d750d14
---
 lib/optparse.rb | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/lib/optparse.rb b/lib/optparse.rb
index 2eedef5..2a8efb6 100644
--- a/lib/optparse.rb
+++ b/lib/optparse.rb
@@ -547,7 +547,7 @@ class OptionParser https://github.com/ruby/ruby/blob/trunk/lib/optparse.rb#L547
     # Parses +arg+ and returns rest of +arg+ and matched portion to the
     # argument pattern. Yields when the pattern doesn't match substring.
     #
-    def parse_arg(arg)
+    def parse_arg(arg) # :nodoc:
       pattern or return nil, [arg]
       unless m = pattern.match(arg)
         yield(InvalidArgument, arg)
@@ -572,7 +572,7 @@ class OptionParser https://github.com/ruby/ruby/blob/trunk/lib/optparse.rb#L572
     # conversion. Yields at semi-error condition instead of raising an
     # exception.
     #
-    def conv_arg(arg, val = [])
+    def conv_arg(arg, val = []) # :nodoc:
       if conv
         val = conv.call(*val)
       else
@@ -806,7 +806,7 @@ class OptionParser https://github.com/ruby/ruby/blob/trunk/lib/optparse.rb#L806
     # +lopts+::  Long style option list.
     # +nlopts+:: Negated long style options list.
     #
-    def update(sw, sopts, lopts, nsw = nil, nlopts = nil)
+    def update(sw, sopts, lopts, nsw = nil, nlopts = nil) # :nodoc:
       sopts.each {|o| @short[o] = sw} if sopts
       lopts.each {|o| @long[o] = sw} if lopts
       nlopts.each {|o| @long[o] = nsw} if nsw and nlopts
@@ -1300,7 +1300,7 @@ XXX https://github.com/ruby/ruby/blob/trunk/lib/optparse.rb#L1300
   # +prv+:: Previously specified argument.
   # +msg+:: Exception message.
   #
-  def notwice(obj, prv, msg)
+  def notwice(obj, prv, msg) # :nodoc:
     unless !prv or prv == obj
       raise(ArgumentError, "argument #{msg} given twice: #{obj}",
             ParseError.filter_backtrace(caller(2)))
@@ -1732,7 +1732,7 @@ XXX https://github.com/ruby/ruby/blob/trunk/lib/optparse.rb#L1732
   # Traverses @stack, sending each element method +id+ with +args+ and
   # +block+.
   #
-  def visit(id, *args, &block)
+  def visit(id, *args, &block) # :nodoc:
     @stack.reverse_each do |el|
       el.__send__(id, *args, &block)
     end
@@ -1743,7 +1743,7 @@ XXX https://github.com/ruby/ruby/blob/trunk/lib/optparse.rb#L1743
   #
   # Searches +key+ in @stack for +id+ hash and returns or yields the result.
   #
-  def search(id, key)
+  def search(id, key) # :nodoc:
     block_given = block_given?
     visit(:search, id, key) do |k|
       return block_given ? yield(k) : k
@@ -1760,7 +1760,7 @@ XXX https://github.com/ruby/ruby/blob/trunk/lib/optparse.rb#L1760
   # +icase+:: Search case insensitive if true.
   # +pat+::   Optional pattern for completion.
   #
-  def complete(typ, opt, icase = false, *pat)
+  def complete(typ, opt, icase = false, *pat) # :nodoc:
     if pat.empty?
       search(typ, opt) {|sw| return [sw, opt]} # exact match or...
     end
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]