ruby-changes:71129
From: Nobuyoshi <ko1@a...>
Date: Wed, 9 Feb 2022 19:41:25 +0900 (JST)
Subject: [ruby-changes:71129] 994b3f1dc6 (master): [ruby/rdoc] Allow cross references to negation operator method
https://git.ruby-lang.org/ruby.git/commit/?id=994b3f1dc6 From 994b3f1dc61b3eb3021fad82f6a7b934af8d0961 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Wed, 9 Feb 2022 19:13:54 +0900 Subject: [ruby/rdoc] Allow cross references to negation operator method https://github.com/ruby/rdoc/commit/69cafb213a --- lib/rdoc/cross_reference.rb | 2 +- test/rdoc/test_rdoc_cross_reference.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rdoc/cross_reference.rb b/lib/rdoc/cross_reference.rb index 205dcc0cbd..7c0b405f3a 100644 --- a/lib/rdoc/cross_reference.rb +++ b/lib/rdoc/cross_reference.rb @@ -19,7 +19,7 @@ class RDoc::CrossReference https://github.com/ruby/ruby/blob/trunk/lib/rdoc/cross_reference.rb#L19 # # 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 diff --git a/test/rdoc/test_rdoc_cross_reference.rb b/test/rdoc/test_rdoc_cross_reference.rb index bd96006976..0417bf5d50 100644 --- a/test/rdoc/test_rdoc_cross_reference.rb +++ b/test/rdoc/test_rdoc_cross_reference.rb @@ -2,7 +2,7 @@ https://github.com/ruby/ruby/blob/trunk/test/rdoc/test_rdoc_cross_reference.rb#L2 require File.expand_path '../xref_test_case', __FILE__ class TestRDocCrossReference < XrefTestCase - OPERATOR_METHODS = %w'== === != =~ !~ < > <= >= <=> [] []= << >> -@ +@ ! - + * / % ** !@ ` | & ^' + OPERATOR_METHODS = %w'== === != =~ !~ < > <= >= <=> [] []= << >> -@ +@ ! - + * / % ** !@ ` | & ^ ~' def setup super -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/