[ruby/rdoc] Allow cross references to logical operator methods

https://github.com/ruby/rdoc/commit/17c0da304d
This commit is contained in:
Nobuyoshi Nakada 2022-02-09 18:56:36 +09:00 коммит произвёл git
Родитель cbd54cba03
Коммит 8db06fe2c9
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -2,7 +2,7 @@
require File.expand_path '../xref_test_case', __FILE__
class TestRDocCrossReference < XrefTestCase
OPERATOR_METHODS = %w'== === != =~ !~ < > <= >= <=> [] []= << >> -@ +@ ! - + * / % ** !@ `'
OPERATOR_METHODS = %w'== === != =~ !~ < > <= >= <=> [] []= << >> -@ +@ ! - + * / % ** !@ ` | & ^'
def setup
super