[DOC] Exclude 'Method' from RDoc's autolinking
This commit is contained in:
parent
d441d35107
commit
b4ec22fe6c
Notes:
git
2025-01-02 05:23:07 +00:00
@ -13,6 +13,7 @@ exclude:
|
|||||||
- .gemspec
|
- .gemspec
|
||||||
|
|
||||||
autolink_excluded_words:
|
autolink_excluded_words:
|
||||||
|
- Method
|
||||||
- Process
|
- Process
|
||||||
- Ruby
|
- Ruby
|
||||||
- Set
|
- Set
|
||||||
|
4
array.c
4
array.c
@ -8302,7 +8302,7 @@ rb_ary_deconstruct(VALUE ary)
|
|||||||
* %i[foo bar baz] # => [:foo, :bar, :baz]
|
* %i[foo bar baz] # => [:foo, :bar, :baz]
|
||||||
* %i[1 % *] # => [:"1", :%, :*]
|
* %i[1 % *] # => [:"1", :%, :*]
|
||||||
*
|
*
|
||||||
* - \Method Kernel#Array:
|
* - Method Kernel#Array:
|
||||||
*
|
*
|
||||||
* Array(["a", "b"]) # => ["a", "b"]
|
* Array(["a", "b"]) # => ["a", "b"]
|
||||||
* Array(1..5) # => [1, 2, 3, 4, 5]
|
* Array(1..5) # => [1, 2, 3, 4, 5]
|
||||||
@ -8311,7 +8311,7 @@ rb_ary_deconstruct(VALUE ary)
|
|||||||
* Array(1) # => [1]
|
* Array(1) # => [1]
|
||||||
* Array({:a => "a", :b => "b"}) # => [[:a, "a"], [:b, "b"]]
|
* Array({:a => "a", :b => "b"}) # => [[:a, "a"], [:b, "b"]]
|
||||||
*
|
*
|
||||||
* - \Method Array.new:
|
* - Method Array.new:
|
||||||
*
|
*
|
||||||
* Array.new # => []
|
* Array.new # => []
|
||||||
* Array.new(3) # => [nil, nil, nil]
|
* Array.new(3) # => [nil, nil, nil]
|
||||||
|
12
complex.c
12
complex.c
@ -2474,9 +2474,9 @@ float_arg(VALUE self)
|
|||||||
* You can create a \Complex object from rectangular coordinates with:
|
* You can create a \Complex object from rectangular coordinates with:
|
||||||
*
|
*
|
||||||
* - A {complex literal}[rdoc-ref:syntax/literals.rdoc@Complex+Literals].
|
* - A {complex literal}[rdoc-ref:syntax/literals.rdoc@Complex+Literals].
|
||||||
* - \Method Complex.rect.
|
* - Method Complex.rect.
|
||||||
* - \Method Kernel#Complex, either with numeric arguments or with certain string arguments.
|
* - Method Kernel#Complex, either with numeric arguments or with certain string arguments.
|
||||||
* - \Method String#to_c, for certain strings.
|
* - Method String#to_c, for certain strings.
|
||||||
*
|
*
|
||||||
* Note that each of the stored parts may be a an instance one of the classes
|
* Note that each of the stored parts may be a an instance one of the classes
|
||||||
* Complex, Float, Integer, or Rational;
|
* Complex, Float, Integer, or Rational;
|
||||||
@ -2502,9 +2502,9 @@ float_arg(VALUE self)
|
|||||||
*
|
*
|
||||||
* You can create a \Complex object from polar coordinates with:
|
* You can create a \Complex object from polar coordinates with:
|
||||||
*
|
*
|
||||||
* - \Method Complex.polar.
|
* - Method Complex.polar.
|
||||||
* - \Method Kernel#Complex, with certain string arguments.
|
* - Method Kernel#Complex, with certain string arguments.
|
||||||
* - \Method String#to_c, for certain strings.
|
* - Method String#to_c, for certain strings.
|
||||||
*
|
*
|
||||||
* Note that each of the stored parts may be a an instance one of the classes
|
* Note that each of the stored parts may be a an instance one of the classes
|
||||||
* Complex, Float, Integer, or Rational;
|
* Complex, Float, Integer, or Rational;
|
||||||
|
10
dir.rb
10
dir.rb
@ -46,14 +46,14 @@
|
|||||||
# The stream has a _position_, which is the index of an entry in the directory:
|
# The stream has a _position_, which is the index of an entry in the directory:
|
||||||
#
|
#
|
||||||
# - The initial position is zero (before the first entry).
|
# - The initial position is zero (before the first entry).
|
||||||
# - \Method #tell (aliased as #pos) returns the position.
|
# - Method #tell (aliased as #pos) returns the position.
|
||||||
# - \Method #pos= sets the position (but ignores a value outside the stream),
|
# - Method #pos= sets the position (but ignores a value outside the stream),
|
||||||
# and returns the position.
|
# and returns the position.
|
||||||
# - \Method #seek is like #pos=, but returns +self+ (convenient for chaining).
|
# - Method #seek is like #pos=, but returns +self+ (convenient for chaining).
|
||||||
# - \Method #read, if not at end-of-stream, reads the next entry and increments
|
# - Method #read, if not at end-of-stream, reads the next entry and increments
|
||||||
# the position;
|
# the position;
|
||||||
# if at end-of-stream, does not increment the position.
|
# if at end-of-stream, does not increment the position.
|
||||||
# - \Method #rewind sets the position to zero.
|
# - Method #rewind sets the position to zero.
|
||||||
#
|
#
|
||||||
# Examples (using the {simple file tree}[rdoc-ref:Dir@About+the+Examples]):
|
# Examples (using the {simple file tree}[rdoc-ref:Dir@About+the+Examples]):
|
||||||
#
|
#
|
||||||
|
@ -78,9 +78,9 @@ A regular expression may be created with:
|
|||||||
%r(foo) # => /foo/
|
%r(foo) # => /foo/
|
||||||
%r<foo> # => /foo/
|
%r<foo> # => /foo/
|
||||||
|
|
||||||
- \Method Regexp.new.
|
- Method Regexp.new.
|
||||||
|
|
||||||
== \Method <tt>match</tt>
|
== Method <tt>match</tt>
|
||||||
|
|
||||||
Each of the methods Regexp#match, String#match, and Symbol#match
|
Each of the methods Regexp#match, String#match, and Symbol#match
|
||||||
returns a MatchData object if a match was found, +nil+ otherwise;
|
returns a MatchData object if a match was found, +nil+ otherwise;
|
||||||
@ -99,7 +99,7 @@ each also sets {global variables}[rdoc-ref:Regexp@Global+Variables]:
|
|||||||
'foo bar' =~ /bar/ # => 4
|
'foo bar' =~ /bar/ # => 4
|
||||||
/baz/ =~ 'foo bar' # => nil
|
/baz/ =~ 'foo bar' # => nil
|
||||||
|
|
||||||
== \Method <tt>match?</tt>
|
== Method <tt>match?</tt>
|
||||||
|
|
||||||
Each of the methods Regexp#match?, String#match?, and Symbol#match?
|
Each of the methods Regexp#match?, String#match?, and Symbol#match?
|
||||||
returns +true+ if a match was found, +false+ otherwise;
|
returns +true+ if a match was found, +false+ otherwise;
|
||||||
@ -477,7 +477,7 @@ Each alternative is a subexpression, and may be composed of other subexpressions
|
|||||||
re.match('bar') # => #<MatchData "b" 1:"b">
|
re.match('bar') # => #<MatchData "b" 1:"b">
|
||||||
re.match('ooz') # => #<MatchData "z" 1:"z">
|
re.match('ooz') # => #<MatchData "z" 1:"z">
|
||||||
|
|
||||||
\Method Regexp.union provides a convenient way to construct
|
Method Regexp.union provides a convenient way to construct
|
||||||
a regexp with alternatives.
|
a regexp with alternatives.
|
||||||
|
|
||||||
=== Quantifiers
|
=== Quantifiers
|
||||||
@ -682,7 +682,7 @@ the captured substrings are assigned to local variables with corresponding names
|
|||||||
dollars # => "3"
|
dollars # => "3"
|
||||||
cents # => "67"
|
cents # => "67"
|
||||||
|
|
||||||
\Method Regexp#named_captures returns a hash of the capture names and substrings;
|
Method Regexp#named_captures returns a hash of the capture names and substrings;
|
||||||
method Regexp#names returns an array of the capture names.
|
method Regexp#names returns an array of the capture names.
|
||||||
|
|
||||||
==== Atomic Grouping
|
==== Atomic Grouping
|
||||||
@ -1057,7 +1057,7 @@ Example:
|
|||||||
re.match('tEst') # => #<MatchData "tEst">
|
re.match('tEst') # => #<MatchData "tEst">
|
||||||
re.match('tEST') # => nil
|
re.match('tEST') # => nil
|
||||||
|
|
||||||
\Method Regexp#options returns an integer whose value showing
|
Method Regexp#options returns an integer whose value showing
|
||||||
the settings for case-insensitivity mode, multiline mode, and extended mode.
|
the settings for case-insensitivity mode, multiline mode, and extended mode.
|
||||||
|
|
||||||
=== Case-Insensitive Mode
|
=== Case-Insensitive Mode
|
||||||
@ -1071,7 +1071,7 @@ Modifier +i+ enables case-insensitive mode:
|
|||||||
/foo/i.match('FOO')
|
/foo/i.match('FOO')
|
||||||
# => #<MatchData "FOO">
|
# => #<MatchData "FOO">
|
||||||
|
|
||||||
\Method Regexp#casefold? returns whether the mode is case-insensitive.
|
Method Regexp#casefold? returns whether the mode is case-insensitive.
|
||||||
|
|
||||||
=== Multiline Mode
|
=== Multiline Mode
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ Other characters, such as the Euro symbol, are multi-byte:
|
|||||||
|
|
||||||
Ruby encodings are defined by constants in class \Encoding.
|
Ruby encodings are defined by constants in class \Encoding.
|
||||||
There can be only one instance of \Encoding for each of these constants.
|
There can be only one instance of \Encoding for each of these constants.
|
||||||
\Method Encoding.list returns an array of \Encoding objects (one for each constant):
|
Method Encoding.list returns an array of \Encoding objects (one for each constant):
|
||||||
|
|
||||||
Encoding.list.size # => 103
|
Encoding.list.size # => 103
|
||||||
Encoding.list.first.class # => Encoding
|
Encoding.list.first.class # => Encoding
|
||||||
@ -45,7 +45,7 @@ There can be only one instance of \Encoding for each of these constants.
|
|||||||
|
|
||||||
=== Names and Aliases
|
=== Names and Aliases
|
||||||
|
|
||||||
\Method Encoding#name returns the name of an \Encoding:
|
Method Encoding#name returns the name of an \Encoding:
|
||||||
|
|
||||||
Encoding::ASCII_8BIT.name # => "ASCII-8BIT"
|
Encoding::ASCII_8BIT.name # => "ASCII-8BIT"
|
||||||
Encoding::WINDOWS_31J.name # => "Windows-31J"
|
Encoding::WINDOWS_31J.name # => "Windows-31J"
|
||||||
@ -58,29 +58,29 @@ method Encoding#names returns an array containing the name and all aliases:
|
|||||||
Encoding::WINDOWS_31J.names
|
Encoding::WINDOWS_31J.names
|
||||||
#=> ["Windows-31J", "CP932", "csWindows31J", "SJIS", "PCK"]
|
#=> ["Windows-31J", "CP932", "csWindows31J", "SJIS", "PCK"]
|
||||||
|
|
||||||
\Method Encoding.aliases returns a hash of all alias/name pairs:
|
Method Encoding.aliases returns a hash of all alias/name pairs:
|
||||||
|
|
||||||
Encoding.aliases.size # => 71
|
Encoding.aliases.size # => 71
|
||||||
Encoding.aliases.take(3)
|
Encoding.aliases.take(3)
|
||||||
# => [["BINARY", "ASCII-8BIT"], ["CP437", "IBM437"], ["CP720", "IBM720"]]
|
# => [["BINARY", "ASCII-8BIT"], ["CP437", "IBM437"], ["CP720", "IBM720"]]
|
||||||
|
|
||||||
\Method Encoding.name_list returns an array of all the encoding names and aliases:
|
Method Encoding.name_list returns an array of all the encoding names and aliases:
|
||||||
|
|
||||||
Encoding.name_list.size # => 175
|
Encoding.name_list.size # => 175
|
||||||
Encoding.name_list.take(3)
|
Encoding.name_list.take(3)
|
||||||
# => ["ASCII-8BIT", "UTF-8", "US-ASCII"]
|
# => ["ASCII-8BIT", "UTF-8", "US-ASCII"]
|
||||||
|
|
||||||
\Method +name_list+ returns more entries than method +list+
|
Method +name_list+ returns more entries than method +list+
|
||||||
because it includes both the names and their aliases.
|
because it includes both the names and their aliases.
|
||||||
|
|
||||||
\Method Encoding.find returns the \Encoding for a given name or alias, if it exists:
|
Method Encoding.find returns the \Encoding for a given name or alias, if it exists:
|
||||||
|
|
||||||
Encoding.find("US-ASCII") # => #<Encoding:US-ASCII>
|
Encoding.find("US-ASCII") # => #<Encoding:US-ASCII>
|
||||||
Encoding.find("US-ASCII").class # => Encoding
|
Encoding.find("US-ASCII").class # => Encoding
|
||||||
|
|
||||||
=== Default Encodings
|
=== Default Encodings
|
||||||
|
|
||||||
\Method Encoding.find, above, also returns a default \Encoding
|
Method Encoding.find, above, also returns a default \Encoding
|
||||||
for each of these special names:
|
for each of these special names:
|
||||||
|
|
||||||
- +external+: the default external \Encoding:
|
- +external+: the default external \Encoding:
|
||||||
@ -100,27 +100,27 @@ for each of these special names:
|
|||||||
|
|
||||||
Encoding.find("filesystem") # => #<Encoding:UTF-8>
|
Encoding.find("filesystem") # => #<Encoding:UTF-8>
|
||||||
|
|
||||||
\Method Encoding.default_external returns the default external \Encoding:
|
Method Encoding.default_external returns the default external \Encoding:
|
||||||
|
|
||||||
Encoding.default_external # => #<Encoding:UTF-8>
|
Encoding.default_external # => #<Encoding:UTF-8>
|
||||||
|
|
||||||
\Method Encoding.default_external= sets that value:
|
Method Encoding.default_external= sets that value:
|
||||||
|
|
||||||
Encoding.default_external = 'US-ASCII' # => "US-ASCII"
|
Encoding.default_external = 'US-ASCII' # => "US-ASCII"
|
||||||
Encoding.default_external # => #<Encoding:US-ASCII>
|
Encoding.default_external # => #<Encoding:US-ASCII>
|
||||||
|
|
||||||
\Method Encoding.default_internal returns the default internal \Encoding:
|
Method Encoding.default_internal returns the default internal \Encoding:
|
||||||
|
|
||||||
Encoding.default_internal # => nil
|
Encoding.default_internal # => nil
|
||||||
|
|
||||||
\Method Encoding.default_internal= sets the default internal \Encoding:
|
Method Encoding.default_internal= sets the default internal \Encoding:
|
||||||
|
|
||||||
Encoding.default_internal = 'US-ASCII' # => "US-ASCII"
|
Encoding.default_internal = 'US-ASCII' # => "US-ASCII"
|
||||||
Encoding.default_internal # => #<Encoding:US-ASCII>
|
Encoding.default_internal # => #<Encoding:US-ASCII>
|
||||||
|
|
||||||
=== Compatible Encodings
|
=== Compatible Encodings
|
||||||
|
|
||||||
\Method Encoding.compatible? returns whether two given objects are encoding-compatible
|
Method Encoding.compatible? returns whether two given objects are encoding-compatible
|
||||||
(that is, whether they can be concatenated);
|
(that is, whether they can be concatenated);
|
||||||
returns the \Encoding of the concatenated string, or +nil+ if incompatible:
|
returns the \Encoding of the concatenated string, or +nil+ if incompatible:
|
||||||
|
|
||||||
@ -248,7 +248,7 @@ For an \IO or \File object, the external encoding may be set by:
|
|||||||
|
|
||||||
For an \IO, \File, \ARGF, or \StringIO object, the external encoding may be set by:
|
For an \IO, \File, \ARGF, or \StringIO object, the external encoding may be set by:
|
||||||
|
|
||||||
- \Methods +set_encoding+ or (except for \ARGF) +set_encoding_by_bom+.
|
- Methods +set_encoding+ or (except for \ARGF) +set_encoding_by_bom+.
|
||||||
|
|
||||||
=== Internal \Encoding
|
=== Internal \Encoding
|
||||||
|
|
||||||
@ -274,7 +274,7 @@ For an \IO or \File object, the internal encoding may be set by:
|
|||||||
|
|
||||||
For an \IO, \File, \ARGF, or \StringIO object, the internal encoding may be set by:
|
For an \IO, \File, \ARGF, or \StringIO object, the internal encoding may be set by:
|
||||||
|
|
||||||
- \Method +set_encoding+.
|
- Method +set_encoding+.
|
||||||
|
|
||||||
== Script \Encoding
|
== Script \Encoding
|
||||||
|
|
||||||
|
@ -409,7 +409,7 @@ not just the part after the point of failure.
|
|||||||
|
|
||||||
## Raising an \Exception
|
## Raising an \Exception
|
||||||
|
|
||||||
\Method Kernel#raise raises an exception.
|
Method Kernel#raise raises an exception.
|
||||||
|
|
||||||
## Custom Exceptions
|
## Custom Exceptions
|
||||||
|
|
||||||
|
@ -103,14 +103,14 @@ These tables summarize the directives for packing and unpacking.
|
|||||||
|
|
||||||
Certain Ruby core methods deal with packing and unpacking data:
|
Certain Ruby core methods deal with packing and unpacking data:
|
||||||
|
|
||||||
- \Method Array#pack:
|
- Method Array#pack:
|
||||||
Formats each element in array +self+ into a binary string;
|
Formats each element in array +self+ into a binary string;
|
||||||
returns that string.
|
returns that string.
|
||||||
- \Method String#unpack:
|
- Method String#unpack:
|
||||||
Extracts data from string +self+,
|
Extracts data from string +self+,
|
||||||
forming objects that become the elements of a new array;
|
forming objects that become the elements of a new array;
|
||||||
returns that array.
|
returns that array.
|
||||||
- \Method String#unpack1:
|
- Method String#unpack1:
|
||||||
Does the same, but unpacks and returns only the first extracted object.
|
Does the same, but unpacks and returns only the first extracted object.
|
||||||
|
|
||||||
Each of these methods accepts a string +template+,
|
Each of these methods accepts a string +template+,
|
||||||
@ -165,9 +165,9 @@ If elements don't fit the provided directive, only least significant bits are en
|
|||||||
|
|
||||||
[257].pack("C").unpack("C") # => [1]
|
[257].pack("C").unpack("C") # => [1]
|
||||||
|
|
||||||
== Packing \Method
|
== Packing Method
|
||||||
|
|
||||||
\Method Array#pack accepts optional keyword argument
|
Method Array#pack accepts optional keyword argument
|
||||||
+buffer+ that specifies the target string (instead of a new string):
|
+buffer+ that specifies the target string (instead of a new string):
|
||||||
|
|
||||||
[65, 66].pack('C*', buffer: 'foo') # => "fooAB"
|
[65, 66].pack('C*', buffer: 'foo') # => "fooAB"
|
||||||
|
@ -30,7 +30,7 @@ NoMethodError.
|
|||||||
You may also use <code>::</code> to designate a receiver, but this is rarely
|
You may also use <code>::</code> to designate a receiver, but this is rarely
|
||||||
used due to the potential for confusion with <code>::</code> for namespaces.
|
used due to the potential for confusion with <code>::</code> for namespaces.
|
||||||
|
|
||||||
=== Chaining \Method Calls
|
=== Chaining Method Calls
|
||||||
|
|
||||||
You can "chain" method calls by immediately following one method call with another.
|
You can "chain" method calls by immediately following one method call with another.
|
||||||
|
|
||||||
|
2
enum.c
2
enum.c
@ -3912,7 +3912,7 @@ chunk_i(RB_BLOCK_CALL_FUNC_ARGLIST(yielder, enumerator))
|
|||||||
* e.next # => [2, [6, 7, 8]]
|
* e.next # => [2, [6, 7, 8]]
|
||||||
* e.next # => [3, [9, 10]]
|
* e.next # => [3, [9, 10]]
|
||||||
*
|
*
|
||||||
* \Method +chunk+ is especially useful for an enumerable that is already sorted.
|
* Method +chunk+ is especially useful for an enumerable that is already sorted.
|
||||||
* This example counts words for each initial letter in a large array of words:
|
* This example counts words for each initial letter in a large array of words:
|
||||||
*
|
*
|
||||||
* # Get sorted words from a web page.
|
* # Get sorted words from a web page.
|
||||||
|
2
hash.c
2
hash.c
@ -6703,7 +6703,7 @@ static const rb_data_type_t env_data_type = {
|
|||||||
*
|
*
|
||||||
* You can convert certain objects to Hashes with:
|
* You can convert certain objects to Hashes with:
|
||||||
*
|
*
|
||||||
* - \Method #Hash.
|
* - Method #Hash.
|
||||||
*
|
*
|
||||||
* You can create a +Hash+ by calling method Hash.new.
|
* You can create a +Hash+ by calling method Hash.new.
|
||||||
*
|
*
|
||||||
|
8
iseq.c
8
iseq.c
@ -3097,10 +3097,10 @@ iseqw_s_of(VALUE klass, VALUE body)
|
|||||||
* InstructionSequence.disasm(body) -> str
|
* InstructionSequence.disasm(body) -> str
|
||||||
* InstructionSequence.disassemble(body) -> str
|
* InstructionSequence.disassemble(body) -> str
|
||||||
*
|
*
|
||||||
* Takes +body+, a Method or Proc object, and returns a String with the
|
* Takes +body+, a +Method+ or +Proc+ object, and returns a +String+
|
||||||
* human readable instructions for +body+.
|
* with the human readable instructions for +body+.
|
||||||
*
|
*
|
||||||
* For a Method object:
|
* For a +Method+ object:
|
||||||
*
|
*
|
||||||
* # /tmp/method.rb
|
* # /tmp/method.rb
|
||||||
* def hello
|
* def hello
|
||||||
@ -3120,7 +3120,7 @@ iseqw_s_of(VALUE klass, VALUE body)
|
|||||||
* 0013 trace 16 ( 3)
|
* 0013 trace 16 ( 3)
|
||||||
* 0015 leave ( 2)
|
* 0015 leave ( 2)
|
||||||
*
|
*
|
||||||
* For a Proc:
|
* For a +Proc+ object:
|
||||||
*
|
*
|
||||||
* # /tmp/proc.rb
|
* # /tmp/proc.rb
|
||||||
* p = proc { num = 1 + 2 }
|
* p = proc { num = 1 + 2 }
|
||||||
|
@ -926,7 +926,7 @@ num_negative_p(VALUE num)
|
|||||||
*
|
*
|
||||||
* You can convert certain objects to Floats with:
|
* You can convert certain objects to Floats with:
|
||||||
*
|
*
|
||||||
* - \Method #Float.
|
* - Method #Float.
|
||||||
*
|
*
|
||||||
* == What's Here
|
* == What's Here
|
||||||
*
|
*
|
||||||
@ -1521,7 +1521,7 @@ rb_float_pow(VALUE x, VALUE y)
|
|||||||
* 1.eql?(Rational(1, 1)) # => false
|
* 1.eql?(Rational(1, 1)) # => false
|
||||||
* 1.eql?(Complex(1, 0)) # => false
|
* 1.eql?(Complex(1, 0)) # => false
|
||||||
*
|
*
|
||||||
* \Method +eql?+ is different from <tt>==</tt> in that +eql?+ requires matching types,
|
* Method +eql?+ is different from <tt>==</tt> in that +eql?+ requires matching types,
|
||||||
* while <tt>==</tt> does not.
|
* while <tt>==</tt> does not.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@ -3539,7 +3539,7 @@ rb_num2ull(VALUE val)
|
|||||||
*
|
*
|
||||||
* You can convert certain objects to Integers with:
|
* You can convert certain objects to Integers with:
|
||||||
*
|
*
|
||||||
* - \Method #Integer.
|
* - Method #Integer.
|
||||||
*
|
*
|
||||||
* An attempt to add a singleton method to an instance of this class
|
* An attempt to add a singleton method to an instance of this class
|
||||||
* causes an exception to be raised.
|
* causes an exception to be raised.
|
||||||
|
6
object.c
6
object.c
@ -4186,7 +4186,7 @@ rb_f_loop_size(VALUE self, VALUE args, VALUE eobj)
|
|||||||
* - #instance_of?: Returns whether +self+ is an instance of the given class.
|
* - #instance_of?: Returns whether +self+ is an instance of the given class.
|
||||||
* - #instance_variable_defined?: Returns whether the given instance variable
|
* - #instance_variable_defined?: Returns whether the given instance variable
|
||||||
* is defined in +self+.
|
* is defined in +self+.
|
||||||
* - #method: Returns the Method object for the given method in +self+.
|
* - #method: Returns the +Method+ object for the given method in +self+.
|
||||||
* - #methods: Returns an array of symbol names of public and protected methods
|
* - #methods: Returns an array of symbol names of public and protected methods
|
||||||
* in +self+.
|
* in +self+.
|
||||||
* - #nil?: Returns +false+. (Only +nil+ responds +true+ to method <tt>nil?</tt>.)
|
* - #nil?: Returns +false+. (Only +nil+ responds +true+ to method <tt>nil?</tt>.)
|
||||||
@ -4196,12 +4196,12 @@ rb_f_loop_size(VALUE self, VALUE args, VALUE eobj)
|
|||||||
* of the private methods in +self+.
|
* of the private methods in +self+.
|
||||||
* - #protected_methods: Returns an array of the symbol names
|
* - #protected_methods: Returns an array of the symbol names
|
||||||
* of the protected methods in +self+.
|
* of the protected methods in +self+.
|
||||||
* - #public_method: Returns the Method object for the given public method in +self+.
|
* - #public_method: Returns the +Method+ object for the given public method in +self+.
|
||||||
* - #public_methods: Returns an array of the symbol names
|
* - #public_methods: Returns an array of the symbol names
|
||||||
* of the public methods in +self+.
|
* of the public methods in +self+.
|
||||||
* - #respond_to?: Returns whether +self+ responds to the given method.
|
* - #respond_to?: Returns whether +self+ responds to the given method.
|
||||||
* - #singleton_class: Returns the singleton class of +self+.
|
* - #singleton_class: Returns the singleton class of +self+.
|
||||||
* - #singleton_method: Returns the Method object for the given singleton method
|
* - #singleton_method: Returns the +Method+ object for the given singleton method
|
||||||
* in +self+.
|
* in +self+.
|
||||||
* - #singleton_methods: Returns an array of the symbol names
|
* - #singleton_methods: Returns an array of the symbol names
|
||||||
* of the singleton methods in +self+.
|
* of the singleton methods in +self+.
|
||||||
|
16
proc.c
16
proc.c
@ -1787,7 +1787,7 @@ method_entry_defined_class(const rb_method_entry_t *me)
|
|||||||
*
|
*
|
||||||
* Document-class: Method
|
* Document-class: Method
|
||||||
*
|
*
|
||||||
* Method objects are created by Object#method, and are associated
|
* +Method+ objects are created by Object#method, and are associated
|
||||||
* with a particular object (not just with a class). They may be
|
* with a particular object (not just with a class). They may be
|
||||||
* used to invoke the method within the object, and as a block
|
* used to invoke the method within the object, and as a block
|
||||||
* associated with an iterator. They may also be unbound from one
|
* associated with an iterator. They may also be unbound from one
|
||||||
@ -2046,7 +2046,7 @@ obj_method(VALUE obj, VALUE vid, int scope)
|
|||||||
* obj.method(sym) -> method
|
* obj.method(sym) -> method
|
||||||
*
|
*
|
||||||
* Looks up the named method as a receiver in <i>obj</i>, returning a
|
* Looks up the named method as a receiver in <i>obj</i>, returning a
|
||||||
* Method object (or raising NameError). The Method object acts as a
|
* +Method+ object (or raising NameError). The +Method+ object acts as a
|
||||||
* closure in <i>obj</i>'s object instance, so instance variables and
|
* closure in <i>obj</i>'s object instance, so instance variables and
|
||||||
* the value of <code>self</code> remain available.
|
* the value of <code>self</code> remain available.
|
||||||
*
|
*
|
||||||
@ -2067,7 +2067,7 @@ obj_method(VALUE obj, VALUE vid, int scope)
|
|||||||
* m = l.method("hello")
|
* m = l.method("hello")
|
||||||
* m.call #=> "Hello, @iv = Fred"
|
* m.call #=> "Hello, @iv = Fred"
|
||||||
*
|
*
|
||||||
* Note that Method implements <code>to_proc</code> method, which
|
* Note that +Method+ implements <code>to_proc</code> method, which
|
||||||
* means it can be used with iterators.
|
* means it can be used with iterators.
|
||||||
*
|
*
|
||||||
* [ 1, 2, 3 ].each(&method(:puts)) # => prints 3 lines to stdout
|
* [ 1, 2, 3 ].each(&method(:puts)) # => prints 3 lines to stdout
|
||||||
@ -2566,7 +2566,7 @@ rb_method_call_with_block(int argc, const VALUE *argv, VALUE method, VALUE passe
|
|||||||
*
|
*
|
||||||
* Document-class: UnboundMethod
|
* Document-class: UnboundMethod
|
||||||
*
|
*
|
||||||
* Ruby supports two forms of objectified methods. Class Method is
|
* Ruby supports two forms of objectified methods. Class +Method+ is
|
||||||
* used to represent methods that are associated with a particular
|
* used to represent methods that are associated with a particular
|
||||||
* object: these method objects are bound to that object. Bound
|
* object: these method objects are bound to that object. Bound
|
||||||
* method objects for an object can be created using Object#method.
|
* method objects for an object can be created using Object#method.
|
||||||
@ -3407,7 +3407,7 @@ extern VALUE rb_find_defined_class_by_owner(VALUE current_class, VALUE target_ow
|
|||||||
* call-seq:
|
* call-seq:
|
||||||
* meth.super_method -> method
|
* meth.super_method -> method
|
||||||
*
|
*
|
||||||
* Returns a Method of superclass which would be called when super is used
|
* Returns a +Method+ of superclass which would be called when super is used
|
||||||
* or nil if there is no method on superclass.
|
* or nil if there is no method on superclass.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -4201,7 +4201,6 @@ proc_ruby2_keywords(VALUE procval)
|
|||||||
* a proc by the <code>&</code> operator, and therefore can be
|
* a proc by the <code>&</code> operator, and therefore can be
|
||||||
* consumed by iterators.
|
* consumed by iterators.
|
||||||
*
|
*
|
||||||
|
|
||||||
* class Greeter
|
* class Greeter
|
||||||
* def initialize(greeting)
|
* def initialize(greeting)
|
||||||
* @greeting = greeting
|
* @greeting = greeting
|
||||||
@ -4217,8 +4216,8 @@ proc_ruby2_keywords(VALUE procval)
|
|||||||
* ["Bob", "Jane"].map(&hi) #=> ["Hi, Bob!", "Hi, Jane!"]
|
* ["Bob", "Jane"].map(&hi) #=> ["Hi, Bob!", "Hi, Jane!"]
|
||||||
* ["Bob", "Jane"].map(&hey) #=> ["Hey, Bob!", "Hey, Jane!"]
|
* ["Bob", "Jane"].map(&hey) #=> ["Hey, Bob!", "Hey, Jane!"]
|
||||||
*
|
*
|
||||||
* Of the Ruby core classes, this method is implemented by Symbol,
|
* Of the Ruby core classes, this method is implemented by +Symbol+,
|
||||||
* Method, and Hash.
|
* +Method+, and +Hash+.
|
||||||
*
|
*
|
||||||
* :to_s.to_proc.call(1) #=> "1"
|
* :to_s.to_proc.call(1) #=> "1"
|
||||||
* [1, 2].map(&:to_s) #=> ["1", "2"]
|
* [1, 2].map(&:to_s) #=> ["1", "2"]
|
||||||
@ -4375,7 +4374,6 @@ proc_ruby2_keywords(VALUE procval)
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Init_Proc(void)
|
Init_Proc(void)
|
||||||
{
|
{
|
||||||
|
@ -8778,9 +8778,9 @@ proc_warmup(VALUE _)
|
|||||||
*
|
*
|
||||||
* In addition:
|
* In addition:
|
||||||
*
|
*
|
||||||
* - \Method Kernel#system executes a given command-line (string) in a subshell;
|
* - Method Kernel#system executes a given command-line (string) in a subshell;
|
||||||
* returns +true+, +false+, or +nil+.
|
* returns +true+, +false+, or +nil+.
|
||||||
* - \Method Kernel#` executes a given command-line (string) in a subshell;
|
* - Method Kernel#` executes a given command-line (string) in a subshell;
|
||||||
* returns its $stdout string.
|
* returns its $stdout string.
|
||||||
* - \Module Open3 supports creating child processes
|
* - \Module Open3 supports creating child processes
|
||||||
* with access to their $stdin, $stdout, and $stderr streams.
|
* with access to their $stdin, $stdout, and $stderr streams.
|
||||||
|
4
range.c
4
range.c
@ -2582,7 +2582,7 @@ range_overlap(VALUE range, VALUE other)
|
|||||||
* r = (...2) # => nil...2
|
* r = (...2) # => nil...2
|
||||||
* a[r] # => [1, 2]
|
* a[r] # => [1, 2]
|
||||||
*
|
*
|
||||||
* \Method +each+ for a beginless range raises an exception.
|
* Method +each+ for a beginless range raises an exception.
|
||||||
*
|
*
|
||||||
* == Endless Ranges
|
* == Endless Ranges
|
||||||
*
|
*
|
||||||
@ -2612,7 +2612,7 @@ range_overlap(VALUE range, VALUE other)
|
|||||||
* r = (2..) # => 2..
|
* r = (2..) # => 2..
|
||||||
* a[r] # => [3, 4]
|
* a[r] # => [3, 4]
|
||||||
*
|
*
|
||||||
* \Method +each+ for an endless range calls the given block indefinitely:
|
* Method +each+ for an endless range calls the given block indefinitely:
|
||||||
*
|
*
|
||||||
* a = []
|
* a = []
|
||||||
* r = (1..)
|
* r = (1..)
|
||||||
|
@ -2715,7 +2715,7 @@ nurat_s_convert(int argc, VALUE *argv, VALUE klass)
|
|||||||
*
|
*
|
||||||
* You can convert certain objects to Rationals with:
|
* You can convert certain objects to Rationals with:
|
||||||
*
|
*
|
||||||
* - \Method #Rational.
|
* - Method #Rational.
|
||||||
*
|
*
|
||||||
* Examples
|
* Examples
|
||||||
*
|
*
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#
|
#
|
||||||
# You can convert certain objects to Strings with:
|
# You can convert certain objects to Strings with:
|
||||||
#
|
#
|
||||||
# - \Method #String.
|
# - Method #String.
|
||||||
#
|
#
|
||||||
# Some +String+ methods modify +self+.
|
# Some +String+ methods modify +self+.
|
||||||
# Typically, a method whose name ends with <tt>!</tt> modifies +self+
|
# Typically, a method whose name ends with <tt>!</tt> modifies +self+
|
||||||
|
6
struct.c
6
struct.c
@ -587,7 +587,7 @@ rb_struct_define_under(VALUE outer, const char *name, ...)
|
|||||||
*
|
*
|
||||||
* A subclass returned by Struct.new has these singleton methods:
|
* A subclass returned by Struct.new has these singleton methods:
|
||||||
*
|
*
|
||||||
* - \Method <tt>::new </tt> creates an instance of the subclass:
|
* - Method <tt>::new </tt> creates an instance of the subclass:
|
||||||
*
|
*
|
||||||
* Foo.new # => #<struct Struct::Foo foo=nil, bar=nil>
|
* Foo.new # => #<struct Struct::Foo foo=nil, bar=nil>
|
||||||
* Foo.new(0) # => #<struct Struct::Foo foo=0, bar=nil>
|
* Foo.new(0) # => #<struct Struct::Foo foo=0, bar=nil>
|
||||||
@ -600,12 +600,12 @@ rb_struct_define_under(VALUE outer, const char *name, ...)
|
|||||||
* Foo.new(foo: 0, bar: 1, baz: 2)
|
* Foo.new(foo: 0, bar: 1, baz: 2)
|
||||||
* # Raises ArgumentError: unknown keywords: baz
|
* # Raises ArgumentError: unknown keywords: baz
|
||||||
*
|
*
|
||||||
* - \Method <tt>:inspect</tt> returns a string representation of the subclass:
|
* - Method <tt>:inspect</tt> returns a string representation of the subclass:
|
||||||
*
|
*
|
||||||
* Foo.inspect
|
* Foo.inspect
|
||||||
* # => "Struct::Foo"
|
* # => "Struct::Foo"
|
||||||
*
|
*
|
||||||
* - \Method <tt>::members</tt> returns an array of the member names:
|
* - Method <tt>::members</tt> returns an array of the member names:
|
||||||
*
|
*
|
||||||
* Foo.members # => [:foo, :bar]
|
* Foo.members # => [:foo, :bar]
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user