diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-03-28 03:18:00 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-03-28 03:18:00 +0000 |
commit | 8f2d5e58a3aa67c0a2eb3ba07ce5d60af09a6883 (patch) | |
tree | a9b33d1a0169c4a6c370895f72463180b68d3663 /lib/rdoc/text.rb | |
parent | a2d63ea2fb84c962abddae877e9493fc57cfce1a (diff) | |
download | ruby-8f2d5e58a3aa67c0a2eb3ba07ce5d60af09a6883.tar.gz |
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
Diffstat (limited to 'lib/rdoc/text.rb')
-rw-r--r-- | lib/rdoc/text.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |