Skip to content

Commit 12e4e75

Browse files
ko1hsbt
authored andcommitted
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
1 parent e0ae843 commit 12e4e75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rdoc/text.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def strip_stars text
169169

170170
encoding = text.encoding
171171

172-
text = text.gsub %r%Document-method:\s+[\w:.#=!?|^&<>~+-/*\%@`\[\]]+%, ''
172+
text = text.gsub %r%Document-method:\s+[\w:.#=!?|^&<>~+\-/*\%@`\[\]]+%, ''
173173

174174
space = ' '
175175
space = RDoc::Encoding.change_encoding space, encoding if encoding

0 commit comments

Comments
 (0)