From 8f2d5e58a3aa67c0a2eb3ba07ce5d60af09a6883 Mon Sep 17 00:00:00 2001 From: ko1 Date: Wed, 28 Mar 2018 03:18:00 +0000 Subject: 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(-) (limited to 'lib/rdoc') 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 @@ module RDoc::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 -- cgit v1.2.3