mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/rdoc] Support linking #==
See related commits: - ebc66662 for #=== - 4943d208 for #[], #[]=, #<<, and #>> https://github.com/ruby/rdoc/commit/8e47f7840a
This commit is contained in:
parent
7aec65add4
commit
4c42540da2
2 changed files with 2 additions and 2 deletions
|
@ -19,7 +19,7 @@ class RDoc::CrossReference
|
||||||
#
|
#
|
||||||
# See CLASS_REGEXP_STR
|
# See CLASS_REGEXP_STR
|
||||||
|
|
||||||
METHOD_REGEXP_STR = '([a-z]\w*[!?=]?|%|===|\[\]=?|<<|>>|\+@|-@|-|\+|\*)(?:\([\w.+*/=<>-]*\))?'
|
METHOD_REGEXP_STR = '([a-z]\w*[!?=]?|%|===?|\[\]=?|<<|>>|\+@|-@|-|\+|\*)(?:\([\w.+*/=<>-]*\))?'
|
||||||
|
|
||||||
##
|
##
|
||||||
# Regular expressions matching text that should potentially have
|
# Regular expressions matching text that should potentially have
|
||||||
|
|
|
@ -20,7 +20,7 @@ class TestRDocCrossReference < XrefTestCase
|
||||||
def test_METHOD_REGEXP_STR
|
def test_METHOD_REGEXP_STR
|
||||||
re = /#{RDoc::CrossReference::METHOD_REGEXP_STR}/
|
re = /#{RDoc::CrossReference::METHOD_REGEXP_STR}/
|
||||||
|
|
||||||
%w'=== [] []= << >>'.each do |x|
|
%w'== === [] []= << >>'.each do |x|
|
||||||
re =~ x
|
re =~ x
|
||||||
assert_equal x, $&
|
assert_equal x, $&
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue