Skip to content

Commit

Permalink
Merge pull request #868 from nobu/operator-method
Browse files Browse the repository at this point in the history
Allow cross references to logical operator methods
  • Loading branch information
nobu committed Feb 9, 2022
2 parents b335a73 + 69cafb2 commit 186f5fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/rdoc/cross_reference.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/rdoc/test_rdoc_cross_reference.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require File.expand_path '../xref_test_case', __FILE__

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

def setup
super
Expand Down

0 comments on commit 186f5fe

Please sign in to comment.