Skip to content

Commit

Permalink
[DOC] use local variable like names [ci skip]
Browse files Browse the repository at this point in the history
Use local variable like name as return value which is an instance
of that class but not constant itself.
  • Loading branch information
nobu committed Feb 15, 2020
1 parent fb472ca commit 125bcdb
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions hash.c
Expand Up @@ -5301,7 +5301,7 @@ env_keys(void)

/*
* call-seq:
* ENV.keys -> Array
* ENV.keys -> array
*
* Returns all variable names in an Array:
* ENV.replace('foo' => '0', 'bar' => '1')
Expand Down Expand Up @@ -5339,7 +5339,7 @@ rb_env_size(VALUE ehash, VALUE args, VALUE eobj)
/*
* call-seq:
* ENV.each_key { |name| block } -> ENV
* ENV.each_key -> Enumerator
* ENV.each_key -> enumerator
*
* Yields each environment variable name:
* ENV.replace('foo' => '0', 'bar' => '1') # => ENV
Expand Down Expand Up @@ -5388,7 +5388,7 @@ env_values(void)

/*
* call-seq:
* ENV.values -> Array
* ENV.values -> array
*
* Returns all environment variable values in an Array:
* ENV.replace('foo' => '0', 'bar' => '1')
Expand All @@ -5409,7 +5409,7 @@ env_f_values(VALUE _)
/*
* call-seq:
* ENV.each_value { |value| block } -> ENV
* ENV.each_value -> Enumerator
* ENV.each_value -> enumerator
*
* Yields each environment variable value:
* ENV.replace('foo' => '0', 'bar' => '1') # => ENV
Expand Down Expand Up @@ -5440,9 +5440,9 @@ env_each_value(VALUE ehash)
/*
* call-seq:
* ENV.each { |name, value| block } -> ENV
* ENV.each -> Enumerator
* ENV.each -> enumerator
* 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:
* h = {}
Expand Down Expand Up @@ -5492,7 +5492,7 @@ env_each_pair(VALUE ehash)
/*
* call-seq:
* 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.
*
Expand Down Expand Up @@ -5538,7 +5538,7 @@ env_reject_bang(VALUE ehash)
/*
* call-seq:
* 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,
* deleting each environment variable for which the block returns a truthy value,
Expand All @@ -5565,7 +5565,7 @@ env_delete_if(VALUE ehash)

/*
* call-seq:
* ENV.values_at(*names) -> Array
* ENV.values_at(*names) -> array
*
* Returns an Array containing the environment variable values associated with
* the given names:
Expand Down Expand Up @@ -5596,10 +5596,10 @@ env_values_at(int argc, VALUE *argv, VALUE _)

/*
* call-seq:
* ENV.select { |name, value| block } -> Hash
* ENV.select -> Enumerator
* ENV.filter { |name, value| block } -> Hash
* ENV.filter -> Enumerator
* ENV.select { |name, value| block } -> hash
* ENV.select -> enumerator
* ENV.filter { |name, value| block } -> hash
* ENV.filter -> enumerator
*
* ENV.filter is an alias for ENV.select.
*
Expand Down Expand Up @@ -5642,9 +5642,9 @@ env_select(VALUE ehash)
/*
* call-seq:
* ENV.select! { |name, value| block } -> ENV or nil
* ENV.select! -> Enumerator
* ENV.select! -> enumerator
* ENV.filter! { |name, value| block } -> ENV or nil
* ENV.filter! -> Enumerator
* ENV.filter! -> enumerator
*
* ENV.filter! is an alias for ENV.select!.
*
Expand Down Expand Up @@ -5703,7 +5703,7 @@ env_select_bang(VALUE ehash)
/*
* call-seq:
* 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,
* deleting each environment variable for which the block returns +false+ or +nil+,
Expand Down Expand Up @@ -5840,7 +5840,7 @@ env_inspect(VALUE _)

/*
* call-seq:
* ENV.to_a -> Array
* ENV.to_a -> array
*
* Returns the contents of ENV as an Array of 2-element Arrays,
* each of which is a name/value pair:
Expand Down Expand Up @@ -5886,8 +5886,8 @@ env_none(VALUE _)

/*
* call-seq:
* ENV.length -> Integer
* ENV.size -> Integer
* ENV.length -> integer
* ENV.size -> integer
*
* Returns the count of environment variables:
* ENV.replace('foo' => '0', 'bar' => '1')
Expand Down Expand Up @@ -5968,7 +5968,7 @@ env_has_key(VALUE env, VALUE key)

/*
* 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
* for +name+ if it exists:
Expand Down Expand Up @@ -6151,7 +6151,7 @@ env_to_hash(void)

/*
* call-seq:
* ENV.to_hash -> Hash
* ENV.to_hash -> hash
*
* Returns a Hash containing all name/value pairs from ENV:
* ENV.replace('foo' => '0', 'bar' => '1')
Expand Down Expand Up @@ -6184,8 +6184,8 @@ env_to_h(VALUE _)

/*
* call-seq:
* ENV.reject { |name, value| block } -> Hash
* ENV.reject -> Enumerator
* ENV.reject { |name, value| block } -> hash
* ENV.reject -> enumerator
*
* Same as ENV.delete_if, but works on (and returns) a copy of the
* environment.
Expand Down Expand Up @@ -6249,7 +6249,7 @@ env_shift(VALUE _)

/*
* call-seq:
* ENV.invert -> Hash
* ENV.invert -> hash
*
* Returns a new hash created by using environment variable names as values
* and values as names.
Expand Down

0 comments on commit 125bcdb

Please sign in to comment.