aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rdoc/comment.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-09-07 22:23:38 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-09-07 22:23:38 +0000
commitde4fde9095c5380e8cef0a188d244a10f9184d6d (patch)
tree540581a54cefcdc817577f646f09372f7e9936d1 /lib/rdoc/comment.rb
parentee61f5b40242dbec7fb45d25c5d44dfcfe556526 (diff)
downloadruby-de4fde9095c5380e8cef0a188d244a10f9184d6d.tar.gz
* lib/rdoc/*, test/rdoc/*: Update rdoc-5.0.0.beta2
Fixed ri parse defect with left-hand matched classes. https://github.com/rdoc/rdoc/pull/420 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/comment.rb')
-rw-r--r--lib/rdoc/comment.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/rdoc/comment.rb b/lib/rdoc/comment.rb
index ebff742233..c655763b3e 100644
--- a/lib/rdoc/comment.rb
+++ b/lib/rdoc/comment.rb
@@ -200,7 +200,7 @@ class RDoc::Comment
def remove_private
# Workaround for gsub encoding for Ruby 1.9.2 and earlier
empty = ''
- empty.force_encoding @text.encoding if Object.const_defined? :Encoding
+ empty.force_encoding @text.encoding
@text = @text.gsub(%r%^\s*([#*]?)--.*?^\s*(\1)\+\+\n?%m, empty)
@text = @text.sub(%r%^\s*[#*]?--.*%m, '')
@@ -227,4 +227,3 @@ class RDoc::Comment
end
end
-