[DOC] use local variable like names [ci skip]

Use local variable like name as return value which is an instance
of that class but not constant itself.
This commit is contained in:
Nobuyoshi Nakada 2020-02-15 17:27:16 +09:00
parent fb472ca7ad
commit 125bcdb5cb
No known key found for this signature in database
GPG Key ID: 4BC7D6DF58D8DF60

48
hash.c
View File

@ -5301,7 +5301,7 @@ env_keys(void)
/* /*
* call-seq: * call-seq:
* ENV.keys -> Array * ENV.keys -> array
* *
* Returns all variable names in an Array: * Returns all variable names in an Array:
* ENV.replace('foo' => '0', 'bar' => '1') * ENV.replace('foo' => '0', 'bar' => '1')
@ -5339,7 +5339,7 @@ rb_env_size(VALUE ehash, VALUE args, VALUE eobj)
/* /*
* call-seq: * call-seq:
* ENV.each_key { |name| block } -> ENV * ENV.each_key { |name| block } -> ENV
* ENV.each_key -> Enumerator * ENV.each_key -> enumerator
* *
* Yields each environment variable name: * Yields each environment variable name:
* ENV.replace('foo' => '0', 'bar' => '1') # => ENV * ENV.replace('foo' => '0', 'bar' => '1') # => ENV
@ -5388,7 +5388,7 @@ env_values(void)
/* /*
* call-seq: * call-seq:
* ENV.values -> Array * ENV.values -> array
* *
* Returns all environment variable values in an Array: * Returns all environment variable values in an Array:
* ENV.replace('foo' => '0', 'bar' => '1') * ENV.replace('foo' => '0', 'bar' => '1')
@ -5409,7 +5409,7 @@ env_f_values(VALUE _)
/* /*
* call-seq: * call-seq:
* ENV.each_value { |value| block } -> ENV * ENV.each_value { |value| block } -> ENV
* ENV.each_value -> Enumerator * ENV.each_value -> enumerator
* *
* Yields each environment variable value: * Yields each environment variable value:
* ENV.replace('foo' => '0', 'bar' => '1') # => ENV * ENV.replace('foo' => '0', 'bar' => '1') # => ENV
@ -5440,9 +5440,9 @@ env_each_value(VALUE ehash)
/* /*
* call-seq: * call-seq:
* ENV.each { |name, value| block } -> ENV * ENV.each { |name, value| block } -> ENV
* ENV.each -> Enumerator * ENV.each -> enumerator
* ENV.each_pair { |name, value| block } -> ENV * ENV.each_pair { |name, value| block } -> ENV
* ENV.each_pair -> Enumerator * ENV.each_pair -> enumerator
* *
* Yields each environment variable name and its value as a 2-element Array: * Yields each environment variable name and its value as a 2-element Array:
* h = {} * h = {}
@ -5492,7 +5492,7 @@ env_each_pair(VALUE ehash)
/* /*
* call-seq: * call-seq:
* ENV.reject! { |name, value| block } -> ENV or nil * ENV.reject! { |name, value| block } -> ENV or nil
* ENV.reject! -> Enumerator * ENV.reject! -> enumerator
* *
* Similar to ENV.delete_if, but returns +nil+ if no changes were made. * Similar to ENV.delete_if, but returns +nil+ if no changes were made.
* *
@ -5538,7 +5538,7 @@ env_reject_bang(VALUE ehash)
/* /*
* call-seq: * call-seq:
* ENV.delete_if { |name, value| block } -> ENV * ENV.delete_if { |name, value| block } -> ENV
* ENV.delete_if -> Enumerator * ENV.delete_if -> enumerator
* *
* Yields each environment variable name and its value as a 2-element Array, * Yields each environment variable name and its value as a 2-element Array,
* deleting each environment variable for which the block returns a truthy value, * deleting each environment variable for which the block returns a truthy value,
@ -5565,7 +5565,7 @@ env_delete_if(VALUE ehash)
/* /*
* call-seq: * call-seq:
* ENV.values_at(*names) -> Array * ENV.values_at(*names) -> array
* *
* Returns an Array containing the environment variable values associated with * Returns an Array containing the environment variable values associated with
* the given names: * the given names:
@ -5596,10 +5596,10 @@ env_values_at(int argc, VALUE *argv, VALUE _)
/* /*
* call-seq: * call-seq:
* ENV.select { |name, value| block } -> Hash * ENV.select { |name, value| block } -> hash
* ENV.select -> Enumerator * ENV.select -> enumerator
* ENV.filter { |name, value| block } -> Hash * ENV.filter { |name, value| block } -> hash
* ENV.filter -> Enumerator * ENV.filter -> enumerator
* *
* ENV.filter is an alias for ENV.select. * ENV.filter is an alias for ENV.select.
* *
@ -5642,9 +5642,9 @@ env_select(VALUE ehash)
/* /*
* call-seq: * call-seq:
* ENV.select! { |name, value| block } -> ENV or nil * ENV.select! { |name, value| block } -> ENV or nil
* ENV.select! -> Enumerator * ENV.select! -> enumerator
* ENV.filter! { |name, value| block } -> ENV or nil * ENV.filter! { |name, value| block } -> ENV or nil
* ENV.filter! -> Enumerator * ENV.filter! -> enumerator
* *
* ENV.filter! is an alias for ENV.select!. * ENV.filter! is an alias for ENV.select!.
* *
@ -5703,7 +5703,7 @@ env_select_bang(VALUE ehash)
/* /*
* call-seq: * call-seq:
* ENV.keep_if { |name, value| block } -> ENV * ENV.keep_if { |name, value| block } -> ENV
* ENV.keep_if -> Enumerator * ENV.keep_if -> enumerator
* *
* Yields each environment variable name and its value as a 2-element Array, * Yields each environment variable name and its value as a 2-element Array,
* deleting each environment variable for which the block returns +false+ or +nil+, * deleting each environment variable for which the block returns +false+ or +nil+,
@ -5840,7 +5840,7 @@ env_inspect(VALUE _)
/* /*
* call-seq: * call-seq:
* ENV.to_a -> Array * ENV.to_a -> array
* *
* Returns the contents of ENV as an Array of 2-element Arrays, * Returns the contents of ENV as an Array of 2-element Arrays,
* each of which is a name/value pair: * each of which is a name/value pair:
@ -5886,8 +5886,8 @@ env_none(VALUE _)
/* /*
* call-seq: * call-seq:
* ENV.length -> Integer * ENV.length -> integer
* ENV.size -> Integer * ENV.size -> integer
* *
* Returns the count of environment variables: * Returns the count of environment variables:
* ENV.replace('foo' => '0', 'bar' => '1') * ENV.replace('foo' => '0', 'bar' => '1')
@ -5968,7 +5968,7 @@ env_has_key(VALUE env, VALUE key)
/* /*
* call-seq: * call-seq:
* ENV.assoc(name) -> Array or nil * ENV.assoc(name) -> array or nil
* *
* Returns a 2-element Array containing the name and value of the environment variable * Returns a 2-element Array containing the name and value of the environment variable
* for +name+ if it exists: * for +name+ if it exists:
@ -6151,7 +6151,7 @@ env_to_hash(void)
/* /*
* call-seq: * call-seq:
* ENV.to_hash -> Hash * ENV.to_hash -> hash
* *
* Returns a Hash containing all name/value pairs from ENV: * Returns a Hash containing all name/value pairs from ENV:
* ENV.replace('foo' => '0', 'bar' => '1') * ENV.replace('foo' => '0', 'bar' => '1')
@ -6184,8 +6184,8 @@ env_to_h(VALUE _)
/* /*
* call-seq: * call-seq:
* ENV.reject { |name, value| block } -> Hash * ENV.reject { |name, value| block } -> hash
* ENV.reject -> Enumerator * ENV.reject -> enumerator
* *
* Same as ENV.delete_if, but works on (and returns) a copy of the * Same as ENV.delete_if, but works on (and returns) a copy of the
* environment. * environment.
@ -6249,7 +6249,7 @@ env_shift(VALUE _)
/* /*
* call-seq: * call-seq:
* ENV.invert -> Hash * ENV.invert -> hash
* *
* Returns a new hash created by using environment variable names as values * Returns a new hash created by using environment variable names as values
* and values as names. * and values as names.