[前][次][番号順一覧][スレッド一覧]

ruby-changes:50753

From: ko1 <ko1@a...>
Date: Wed, 28 Mar 2018 12:18:08 +0900 (JST)
Subject: [ruby-changes:50753] ko1:r62935 (trunk): fix regexp introduced at recent RDoc update (r62924).

ko1	2018-03-28 12:18:00 +0900 (Wed, 28 Mar 2018)

  New Revision: 62935

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=62935

  Log:
    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: ...

  Modified files:
    trunk/lib/rdoc/text.rb
Index: lib/rdoc/text.rb
===================================================================
--- lib/rdoc/text.rb	(revision 62934)
+++ lib/rdoc/text.rb	(revision 62935)
@@ -169,7 +169,7 @@ module RDoc::Text https://github.com/ruby/ruby/blob/trunk/lib/rdoc/text.rb#L169
 
     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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]