Skip to content

Commit 17c0da3

Browse files
committed
Allow cross references to logical operator methods
1 parent b335a73 commit 17c0da3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/rdoc/cross_reference.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class RDoc::CrossReference
1919
#
2020
# See CLASS_REGEXP_STR
2121

22-
METHOD_REGEXP_STR = '([A-Za-z]\w*[!?=]?|%|=(?:==?|~)|![=~]|\[\]=?|<(?:<|=>?)?|>[>=]?|[-+!]@?|\*\*?|[/%`])(?:\([\w.+*/=<>-]*\))?'
22+
METHOD_REGEXP_STR = '([A-Za-z]\w*[!?=]?|%|=(?:==?|~)|![=~]|\[\]=?|<(?:<|=>?)?|>[>=]?|[-+!]@?|\*\*?|[/%`|&^])(?:\([\w.+*/=<>-]*\))?'
2323

2424
##
2525
# Regular expressions matching text that should potentially have

test/rdoc/test_rdoc_cross_reference.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
require File.expand_path '../xref_test_case', __FILE__
33

44
class TestRDocCrossReference < XrefTestCase
5-
OPERATOR_METHODS = %w'== === != =~ !~ < > <= >= <=> [] []= << >> -@ +@ ! - + * / % ** !@ `'
5+
OPERATOR_METHODS = %w'== === != =~ !~ < > <= >= <=> [] []= << >> -@ +@ ! - + * / % ** !@ ` | & ^'
66

77
def setup
88
super

0 commit comments

Comments
 (0)