From 300f4677c93fb7ce312bba27e50b0af51ce8ba2e Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 26 Mar 2022 21:07:06 +0900 Subject: [DOC] Use simple references to operator methods Method references is not only able to be marked up as code, also reflects `--show-hash` option. The bug that prevented the old rdoc from correctly parsing these methods was fixed last month. --- string.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'string.c') diff --git a/string.c b/string.c index 9d200ecb20..3cf8d38a2d 100644 --- a/string.c +++ b/string.c @@ -11443,9 +11443,8 @@ rb_str_unicode_normalized_p(int argc, VALUE *argv, VALUE str) * === Methods for Querying * * - ::all_symbols:: Returns an array of the symbols currently in Ruby's symbol table. - * - {#=~}[#method-i-3D~]:: Returns the index of the first substring - * in symbol that matches a given Regexp - * or other object; returns +nil+ if no match is found. + * - #=~:: Returns the index of the first substring in symbol that matches a + * given Regexp or other object; returns +nil+ if no match is found. * - #[], #slice :: Returns a substring of symbol * determined by a given index, start/length, or range, or string. * - #empty?:: Returns +true+ if +self.length+ is zero; +false+ otherwise. @@ -11729,7 +11728,7 @@ sym_cmp(VALUE sym, VALUE other) * call-seq: * casecmp(other_symbol) -> -1, 0, 1, or nil * - * Case-insensitive version of {Symbol#<=>}[#method-i-3C-3D-3E]: + * Case-insensitive version of #<=>: * * :aBcDeF.casecmp(:abcde) # => 1 * :aBcDeF.casecmp(:abcdef) # => 0 @@ -12274,8 +12273,8 @@ rb_enc_interned_str_cstr(const char *ptr, rb_encoding *enc) * * _Substrings_ * - * - {#=~}[#method-i-3D~]:: Returns the index of the first substring that matches a given Regexp or other object; - * returns +nil+ if no match is found. + * - #=~:: Returns the index of the first substring that matches a given + * Regexp or other object; returns +nil+ if no match is found. * - #index:: Returns the index of the _first_ occurrence of a given substring; * returns +nil+ if none found. * - #rindex:: Returns the index of the _last_ occurrence of a given substring; -- cgit v1.2.3