From 12e4e75684c84552558547a196918aeea3da8add Mon Sep 17 00:00:00 2001 From: ko1 Date: Wed, 28 Mar 2018 03:18:00 +0000 Subject: [PATCH] fix regexp introduced at recent RDoc update (r62924). * lib/rdoc/text.rb: should escape `-` character. Sometimes test fails if `$VERBOSE = 1` with the following warning: > text.rb:172: warning: character class has duplicated range: ... git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rdoc/text.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rdoc/text.rb b/lib/rdoc/text.rb index def80d98a3..22c3777ff9 100644 --- a/lib/rdoc/text.rb +++ b/lib/rdoc/text.rb @@ -169,7 +169,7 @@ def strip_stars text encoding = text.encoding - text = text.gsub %r%Document-method:\s+[\w:.#=!?|^&<>~+-/*\%@`\[\]]+%, '' + text = text.gsub %r%Document-method:\s+[\w:.#=!?|^&<>~+\-/*\%@`\[\]]+%, '' space = ' ' space = RDoc::Encoding.change_encoding space, encoding if encoding