summaryrefslogtreecommitdiff
path: root/lib/rdoc/markup
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-05 09:18:10 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-05 09:18:10 +0000
commitcdc527db342eda4c58b62c5dc2a14441a395df5d (patch)
tree237c953b345a00333d1600706a7f2484b4ad408c /lib/rdoc/markup
parent0a0eb2807ed745e1cdf7f4698fe805b4aaaee2c6 (diff)
* lib/rdoc/*, test/rdoc/*: Update rdoc-5.0.0
Release note: https://github.com/rdoc/rdoc/blob/b825775647f62c5b525e9780a28ff2fbb1d5bf6f/History.rdoc#500--2016-11-05 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/markup')
-rw-r--r--lib/rdoc/markup/pre_process.rb5
-rw-r--r--lib/rdoc/markup/to_bs.rb2
2 files changed, 1 insertions, 6 deletions
diff --git a/lib/rdoc/markup/pre_process.rb b/lib/rdoc/markup/pre_process.rb
index d7cef36158..6ce523be89 100644
--- a/lib/rdoc/markup/pre_process.rb
+++ b/lib/rdoc/markup/pre_process.rb
@@ -102,8 +102,6 @@ class RDoc::Markup::PreProcess
text = text.text
end
- encoding = text.encoding if defined?(Encoding)
-
# regexp helper (square brackets for optional)
# $1 $2 $3 $4 $5
# [prefix][\]:directive:[spaces][param]newline
@@ -122,7 +120,7 @@ class RDoc::Markup::PreProcess
next "#{$1.strip}\n"
end
- handle_directive $1, $3, $5, code_object, encoding, &block
+ handle_directive $1, $3, $5, code_object, text.encoding, &block
end
comment = text unless comment
@@ -291,4 +289,3 @@ class RDoc::Markup::PreProcess
end
end
-
diff --git a/lib/rdoc/markup/to_bs.rb b/lib/rdoc/markup/to_bs.rb
index d55f64c5e7..9a1c7c6ccd 100644
--- a/lib/rdoc/markup/to_bs.rb
+++ b/lib/rdoc/markup/to_bs.rb
@@ -64,7 +64,6 @@ class RDoc::Markup::ToBs < RDoc::Markup::ToRdoc
# Adds bold or underline mixed with backspaces
def convert_string string
- return string unless string.respond_to? :chars # your ruby is lame
return string unless @in_b or @in_em
chars = if @in_b then
string.chars.map do |char| "#{char}\b#{char}" end
@@ -76,4 +75,3 @@ class RDoc::Markup::ToBs < RDoc::Markup::ToRdoc
end
end
-