1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
ko1 2018-03-28 03:18:00 +00:00
parent a2d63ea2fb
commit 8f2d5e58a3

View file

@ -169,7 +169,7 @@ module RDoc::Text
encoding = text.encoding encoding = text.encoding
text = text.gsub %r%Document-method:\s+[\w:.#=!?|^&<>~+-/*\%@`\[\]]+%, '' text = text.gsub %r%Document-method:\s+[\w:.#=!?|^&<>~+\-/*\%@`\[\]]+%, ''
space = ' ' space = ' '
space = RDoc::Encoding.change_encoding space, encoding if encoding space = RDoc::Encoding.change_encoding space, encoding if encoding