summaryrefslogtreecommitdiff
path: root/lib/rdoc/cross_reference.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-02-07 22:06:53 +0900
committergit <svn-admin@ruby-lang.org>2022-02-09 18:44:40 +0900
commit202f690a5edef6d0b8f73c6df53edc02a0f16c7e (patch)
treef6826400d0f0c715e9b14910b52ba1f8c8142422 /lib/rdoc/cross_reference.rb
parentdec96dd89744695d310b70a672b9ea044eeed89f (diff)
[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
Diffstat (limited to 'lib/rdoc/cross_reference.rb')
-rw-r--r--lib/rdoc/cross_reference.rb2
1 files changed, 1 insertions, 1 deletions
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