ruby-changes:60078
From: Nobuyoshi <ko1@a...>
Date: Sat, 15 Feb 2020 17:39:24 +0900 (JST)
Subject: [ruby-changes:60078] 125bcdb5cb (master): [DOC] use local variable like names [ci skip]
https://git.ruby-lang.org/ruby.git/commit/?id=125bcdb5cb From 125bcdb5cbcd03f473540a5a5cf2ef8d44433b77 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sat, 15 Feb 2020 17:27:16 +0900 Subject: [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. diff --git a/hash.c b/hash.c index 20937d7..33bc754 100644 --- a/hash.c +++ b/hash.c @@ -5301,7 +5301,7 @@ env_keys(void) https://github.com/ruby/ruby/blob/trunk/hash.c#L5301 /* * 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) https://github.com/ruby/ruby/blob/trunk/hash.c#L5339 /* * 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) https://github.com/ruby/ruby/blob/trunk/hash.c#L5388 /* * 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 _) https://github.com/ruby/ruby/blob/trunk/hash.c#L5409 /* * 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) https://github.com/ruby/ruby/blob/trunk/hash.c#L5440 /* * 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) https://github.com/ruby/ruby/blob/trunk/hash.c#L5492 /* * 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) https://github.com/ruby/ruby/blob/trunk/hash.c#L5538 /* * 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) https://github.com/ruby/ruby/blob/trunk/hash.c#L5565 /* * 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 _) https://github.com/ruby/ruby/blob/trunk/hash.c#L5596 /* * 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) https://github.com/ruby/ruby/blob/trunk/hash.c#L5642 /* * 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) https://github.com/ruby/ruby/blob/trunk/hash.c#L5703 /* * 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 _) https://github.com/ruby/ruby/blob/trunk/hash.c#L5840 /* * 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 _) https://github.com/ruby/ruby/blob/trunk/hash.c#L5886 /* * 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) https://github.com/ruby/ruby/blob/trunk/hash.c#L5968 /* * 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) https://github.com/ruby/ruby/blob/trunk/hash.c#L6151 /* * 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 _) https://github.com/ruby/ruby/blob/trunk/hash.c#L6184 /* * 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 _) https://github.com/ruby/ruby/blob/trunk/hash.c#L6249 /* * call-seq: - * ENV.invert -> Hash + * ENV.invert -> hash * * Returns a new hash created by using environment variable names as values * and values as names. -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/