aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rdoc/parser/simple.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rdoc/parser/simple.rb')
-rw-r--r--lib/rdoc/parser/simple.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/rdoc/parser/simple.rb b/lib/rdoc/parser/simple.rb
index 73bb7bdffb..f2ab27a92e 100644
--- a/lib/rdoc/parser/simple.rb
+++ b/lib/rdoc/parser/simple.rb
@@ -52,11 +52,10 @@ class RDoc::Parser::Simple < RDoc::Parser
def remove_private_comment comment
# Workaround for gsub encoding for Ruby 1.9.2 and earlier
empty = ''
- empty.force_encoding comment.encoding if Object.const_defined? :Encoding
+ empty.force_encoding comment.encoding
comment = comment.gsub(%r%^--\n.*?^\+\+\n?%m, empty)
comment.sub(%r%^--\n.*%m, empty)
end
end
-