From 202f690a5edef6d0b8f73c6df53edc02a0f16c7e Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Mon, 7 Feb 2022 22:06:53 +0900 Subject: [ruby/rdoc] Allow cross references to operator methods Make operator methods, e.g., `Regexp#=~`, `Integer#<=>`, cross reference targets. https://github.com/ruby/rdoc/commit/5d332a4128 --- lib/rdoc/cross_reference.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/rdoc/cross_reference.rb') diff --git a/lib/rdoc/cross_reference.rb b/lib/rdoc/cross_reference.rb index ef8e21bde8..9e4a6ddf69 100644 --- a/lib/rdoc/cross_reference.rb +++ b/lib/rdoc/cross_reference.rb @@ -19,7 +19,7 @@ class RDoc::CrossReference # # See CLASS_REGEXP_STR - METHOD_REGEXP_STR = '([A-Za-z]\w*[!?=]?|%|===?|\[\]=?|<<|>>|\+@|-@|-|\+|\*)(?:\([\w.+*/=<>-]*\))?' + METHOD_REGEXP_STR = '([A-Za-z]\w*[!?=]?|%|=(?:==?|~)|![=~]|\[\]=?|<(?:<|=>?)?|>[>=]?|[-+!]@?|\*\*?|[/%])(?:\([\w.+*/=<>-]*\))?' ## # Regular expressions matching text that should potentially have -- cgit v1.2.3