summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-02-15 17:27:16 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-02-15 17:32:58 +0900
commit125bcdb5cbcd03f473540a5a5cf2ef8d44433b77 (patch)
tree9357e98116d7698454c54840ee58ab78cbe1f91a
parentfb472ca7adbaceb35aae1b3a6b948720ffc9eb53 (diff)
[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.
-rw-r--r--hash.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/hash.c b/hash.c
index 20937d7178..33bc754c37 100644
--- a/hash.c
+++ b/hash.c
@@ -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')
@@ -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
@@ -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')
@@ -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
@@ -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 = {}
@@ -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.
*
@@ -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,
@@ -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:
@@ -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.
*
@@ -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!.
*
@@ -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+,
@@ -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:
@@ -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')
@@ -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:
@@ -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')
@@ -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.
@@ -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.