summaryrefslogtreecommitdiff
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
commitba6ae341bab83dfc7a624c5bf20d8d162dacaff9 (patch)
tree540581a54cefcdc817577f646f09372f7e9936d1 /lib/rdoc/comment.rb
parentbf51c067b92361007a57909c539591d3d00cdbd8 (diff)
* 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
-