[前][次][番号順一覧][スレッド一覧]

ruby-changes:71130

From: Nobuyoshi <ko1@a...>
Date: Wed, 9 Feb 2022 19:41:25 +0900 (JST)
Subject: [ruby-changes:71130] 8db06fe2c9 (master): [ruby/rdoc] Allow cross references to logical operator methods

https://git.ruby-lang.org/ruby.git/commit/?id=8db06fe2c9

From 8db06fe2c9c1103fd623e97c80660e41502e6580 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Wed, 9 Feb 2022 18:56:36 +0900
Subject: [ruby/rdoc] Allow cross references to logical operator methods

https://github.com/ruby/rdoc/commit/17c0da304d
---
 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 90c17a52ea..205dcc0cbd 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 a226bf4b11..bd96006976 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/

[前][次][番号順一覧][スレッド一覧]