Fix constant documents (#12357)

Delete duplicated `Document-const:` directives

Those directives are attached to `rb_define_const` and `rb_file_const` where we don’t need them because the functions are supported by RDoc.
This commit is contained in:
Soutaro Matsumoto 2024-12-17 11:58:00 +09:00 committed by GitHub
parent b6973e4ffc
commit c7a638747a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 22 additions and 43 deletions

21
dir.c
View File

@ -3851,26 +3851,19 @@ Init_Dir(void)
rb_define_singleton_method(rb_cFile,"fnmatch", file_s_fnmatch, -1); rb_define_singleton_method(rb_cFile,"fnmatch", file_s_fnmatch, -1);
rb_define_singleton_method(rb_cFile,"fnmatch?", file_s_fnmatch, -1); rb_define_singleton_method(rb_cFile,"fnmatch?", file_s_fnmatch, -1);
/* Document-const: FNM_NOESCAPE /* {File::FNM_NOESCAPE}[rdoc-ref:File::Constants@File-3A-3AFNM_NOESCAPE] */
* {File::FNM_NOESCAPE}[rdoc-ref:File::Constants@File-3A-3AFNM_NOESCAPE] */
rb_file_const("FNM_NOESCAPE", INT2FIX(FNM_NOESCAPE)); rb_file_const("FNM_NOESCAPE", INT2FIX(FNM_NOESCAPE));
/* Document-const: FNM_PATHNAME /* {File::FNM_PATHNAME}[rdoc-ref:File::Constants@File-3A-3AFNM_PATHNAME] */
* {File::FNM_PATHNAME}[rdoc-ref:File::Constants@File-3A-3AFNM_PATHNAME] */
rb_file_const("FNM_PATHNAME", INT2FIX(FNM_PATHNAME)); rb_file_const("FNM_PATHNAME", INT2FIX(FNM_PATHNAME));
/* Document-const: FNM_DOTMATCH /* {File::FNM_DOTMATCH}[rdoc-ref:File::Constants@File-3A-3AFNM_DOTMATCH] */
* {File::FNM_DOTMATCH}[rdoc-ref:File::Constants@File-3A-3AFNM_DOTMATCH] */
rb_file_const("FNM_DOTMATCH", INT2FIX(FNM_DOTMATCH)); rb_file_const("FNM_DOTMATCH", INT2FIX(FNM_DOTMATCH));
/* Document-const: FNM_CASEFOLD /* {File::FNM_CASEFOLD}[rdoc-ref:File::Constants@File-3A-3AFNM_CASEFOLD] */
* {File::FNM_CASEFOLD}[rdoc-ref:File::Constants@File-3A-3AFNM_CASEFOLD] */
rb_file_const("FNM_CASEFOLD", INT2FIX(FNM_CASEFOLD)); rb_file_const("FNM_CASEFOLD", INT2FIX(FNM_CASEFOLD));
/* Document-const: FNM_EXTGLOB /* {File::FNM_EXTGLOB}[rdoc-ref:File::Constants@File-3A-3AFNM_EXTGLOB] */
* {File::FNM_EXTGLOB}[rdoc-ref:File::Constants@File-3A-3AFNM_EXTGLOB] */
rb_file_const("FNM_EXTGLOB", INT2FIX(FNM_EXTGLOB)); rb_file_const("FNM_EXTGLOB", INT2FIX(FNM_EXTGLOB));
/* Document-const: FNM_SYSCASE /* {File::FNM_SYSCASE}[rdoc-ref:File::Constants@File-3A-3AFNM_SYSCASE] */
* {File::FNM_SYSCASE}[rdoc-ref:File::Constants@File-3A-3AFNM_SYSCASE] */
rb_file_const("FNM_SYSCASE", INT2FIX(FNM_SYSCASE)); rb_file_const("FNM_SYSCASE", INT2FIX(FNM_SYSCASE));
/* Document-const: FNM_SHORTNAME /* {File::FNM_SHORTNAME}[rdoc-ref:File::Constants@File-3A-3AFNM_SHORTNAME] */
* {File::FNM_SHORTNAME}[rdoc-ref:File::Constants@File-3A-3AFNM_SHORTNAME] */
rb_file_const("FNM_SHORTNAME", INT2FIX(FNM_SHORTNAME)); rb_file_const("FNM_SHORTNAME", INT2FIX(FNM_SHORTNAME));
} }

View File

@ -4529,91 +4529,77 @@ InitVM_transcode(void)
rb_define_method(rb_cEncodingConverter, "replacement=", econv_set_replacement, 1); rb_define_method(rb_cEncodingConverter, "replacement=", econv_set_replacement, 1);
rb_define_method(rb_cEncodingConverter, "==", econv_equal, 1); rb_define_method(rb_cEncodingConverter, "==", econv_equal, 1);
/* Document-const: INVALID_MASK /*
* *Mask for invalid byte sequences
* Mask for invalid byte sequences
*/ */
rb_define_const(rb_cEncodingConverter, "INVALID_MASK", INT2FIX(ECONV_INVALID_MASK)); rb_define_const(rb_cEncodingConverter, "INVALID_MASK", INT2FIX(ECONV_INVALID_MASK));
/* Document-const: INVALID_REPLACE /*
*
* Replace invalid byte sequences * Replace invalid byte sequences
*/ */
rb_define_const(rb_cEncodingConverter, "INVALID_REPLACE", INT2FIX(ECONV_INVALID_REPLACE)); rb_define_const(rb_cEncodingConverter, "INVALID_REPLACE", INT2FIX(ECONV_INVALID_REPLACE));
/* Document-const: UNDEF_MASK /*
*
* Mask for a valid character in the source encoding but no related * Mask for a valid character in the source encoding but no related
* character(s) in destination encoding. * character(s) in destination encoding.
*/ */
rb_define_const(rb_cEncodingConverter, "UNDEF_MASK", INT2FIX(ECONV_UNDEF_MASK)); rb_define_const(rb_cEncodingConverter, "UNDEF_MASK", INT2FIX(ECONV_UNDEF_MASK));
/* Document-const: UNDEF_REPLACE /*
*
* Replace byte sequences that are undefined in the destination encoding. * Replace byte sequences that are undefined in the destination encoding.
*/ */
rb_define_const(rb_cEncodingConverter, "UNDEF_REPLACE", INT2FIX(ECONV_UNDEF_REPLACE)); rb_define_const(rb_cEncodingConverter, "UNDEF_REPLACE", INT2FIX(ECONV_UNDEF_REPLACE));
/* Document-const: UNDEF_HEX_CHARREF /*
*
* Replace byte sequences that are undefined in the destination encoding * Replace byte sequences that are undefined in the destination encoding
* with an XML hexadecimal character reference. This is valid for XML * with an XML hexadecimal character reference. This is valid for XML
* conversion. * conversion.
*/ */
rb_define_const(rb_cEncodingConverter, "UNDEF_HEX_CHARREF", INT2FIX(ECONV_UNDEF_HEX_CHARREF)); rb_define_const(rb_cEncodingConverter, "UNDEF_HEX_CHARREF", INT2FIX(ECONV_UNDEF_HEX_CHARREF));
/* Document-const: PARTIAL_INPUT /*
*
* Indicates the source may be part of a larger string. See * Indicates the source may be part of a larger string. See
* primitive_convert for an example. * primitive_convert for an example.
*/ */
rb_define_const(rb_cEncodingConverter, "PARTIAL_INPUT", INT2FIX(ECONV_PARTIAL_INPUT)); rb_define_const(rb_cEncodingConverter, "PARTIAL_INPUT", INT2FIX(ECONV_PARTIAL_INPUT));
/* Document-const: AFTER_OUTPUT /*
*
* Stop converting after some output is complete but before all of the * Stop converting after some output is complete but before all of the
* input was consumed. See primitive_convert for an example. * input was consumed. See primitive_convert for an example.
*/ */
rb_define_const(rb_cEncodingConverter, "AFTER_OUTPUT", INT2FIX(ECONV_AFTER_OUTPUT)); rb_define_const(rb_cEncodingConverter, "AFTER_OUTPUT", INT2FIX(ECONV_AFTER_OUTPUT));
/* Document-const: UNIVERSAL_NEWLINE_DECORATOR /*
*
* Decorator for converting CRLF and CR to LF * Decorator for converting CRLF and CR to LF
*/ */
rb_define_const(rb_cEncodingConverter, "UNIVERSAL_NEWLINE_DECORATOR", INT2FIX(ECONV_UNIVERSAL_NEWLINE_DECORATOR)); rb_define_const(rb_cEncodingConverter, "UNIVERSAL_NEWLINE_DECORATOR", INT2FIX(ECONV_UNIVERSAL_NEWLINE_DECORATOR));
/* Document-const: LF_NEWLINE_DECORATOR /*
*
* Decorator for converting CRLF and CR to LF when writing * Decorator for converting CRLF and CR to LF when writing
*/ */
rb_define_const(rb_cEncodingConverter, "LF_NEWLINE_DECORATOR", INT2FIX(ECONV_LF_NEWLINE_DECORATOR)); rb_define_const(rb_cEncodingConverter, "LF_NEWLINE_DECORATOR", INT2FIX(ECONV_LF_NEWLINE_DECORATOR));
/* Document-const: CRLF_NEWLINE_DECORATOR /*
*
* Decorator for converting LF to CRLF * Decorator for converting LF to CRLF
*/ */
rb_define_const(rb_cEncodingConverter, "CRLF_NEWLINE_DECORATOR", INT2FIX(ECONV_CRLF_NEWLINE_DECORATOR)); rb_define_const(rb_cEncodingConverter, "CRLF_NEWLINE_DECORATOR", INT2FIX(ECONV_CRLF_NEWLINE_DECORATOR));
/* Document-const: CR_NEWLINE_DECORATOR /*
*
* Decorator for converting LF to CR * Decorator for converting LF to CR
*/ */
rb_define_const(rb_cEncodingConverter, "CR_NEWLINE_DECORATOR", INT2FIX(ECONV_CR_NEWLINE_DECORATOR)); rb_define_const(rb_cEncodingConverter, "CR_NEWLINE_DECORATOR", INT2FIX(ECONV_CR_NEWLINE_DECORATOR));
/* Document-const: XML_TEXT_DECORATOR /*
*
* Escape as XML CharData * Escape as XML CharData
*/ */
rb_define_const(rb_cEncodingConverter, "XML_TEXT_DECORATOR", INT2FIX(ECONV_XML_TEXT_DECORATOR)); rb_define_const(rb_cEncodingConverter, "XML_TEXT_DECORATOR", INT2FIX(ECONV_XML_TEXT_DECORATOR));
/* Document-const: XML_ATTR_CONTENT_DECORATOR /*
*
* Escape as XML AttValue * Escape as XML AttValue
*/ */
rb_define_const(rb_cEncodingConverter, "XML_ATTR_CONTENT_DECORATOR", INT2FIX(ECONV_XML_ATTR_CONTENT_DECORATOR)); rb_define_const(rb_cEncodingConverter, "XML_ATTR_CONTENT_DECORATOR", INT2FIX(ECONV_XML_ATTR_CONTENT_DECORATOR));
/* Document-const: XML_ATTR_QUOTE_DECORATOR /*
*
* Escape as XML AttValue * Escape as XML AttValue
*/ */
rb_define_const(rb_cEncodingConverter, "XML_ATTR_QUOTE_DECORATOR", INT2FIX(ECONV_XML_ATTR_QUOTE_DECORATOR)); rb_define_const(rb_cEncodingConverter, "XML_ATTR_QUOTE_DECORATOR", INT2FIX(ECONV_XML_ATTR_QUOTE_DECORATOR));