diff options
Diffstat (limited to 'lib/rdoc/comment.rb')
-rw-r--r-- | lib/rdoc/comment.rb | 3 |
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 - |