From: Peter Zhu Date: Mon, 10 Feb 2025 19:29:52 +0000 (-0500) Subject: [DOC] Fix call-seq consistency in Array X-Git-Tag: v3_5_0_preview1~758 X-Git-Url: https://repo.or.cz/ruby.git/commitdiff_plain/e603a420e9fb085c37f16f0a32628ecf6232f507 [DOC] Fix call-seq consistency in Array The documentation guide (https://docs.ruby-lang.org/en/master/contributing/documentation_guide_md.html#label-Calling+Sequence+-28for+methods+written+in+C-29) says that the call-seq for instance methods should only include the method name, no prepending `array.`. --- diff --git a/array.c b/array.c index 1d77615bab..e799c2f4e5 100644 --- a/array.c +++ b/array.c @@ -2753,7 +2753,7 @@ rb_ary_length(VALUE ary) /* * call-seq: - * array.empty? -> true or false + * empty? -> true or false * * Returns +true+ if the count of elements in +self+ is zero, * +false+ otherwise. @@ -2922,7 +2922,7 @@ rb_ary_join(VALUE ary, VALUE sep) /* * call-seq: - * array.join(separator = $,) -> new_string + * join(separator = $,) -> new_string * * Returns the new string formed by joining the converted elements of +self+; * for each element +element+: @@ -3088,7 +3088,7 @@ rb_ary_to_h(VALUE ary) /* * call-seq: - * array.to_ary -> self + * to_ary -> self * * Returns +self+. */ @@ -8012,7 +8012,7 @@ rb_ary_one_p(int argc, VALUE *argv, VALUE ary) /* * call-seq: - * array.dig(index, *identifiers) -> object + * dig(index, *identifiers) -> object * * Finds and returns the object in nested object * specified by +index+ and +identifiers+;