aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rdoc/generator
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/generator
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/generator')
-rw-r--r--lib/rdoc/generator/darkfish.rb6
-rw-r--r--lib/rdoc/generator/json_index.rb3
2 files changed, 3 insertions, 6 deletions
diff --git a/lib/rdoc/generator/darkfish.rb b/lib/rdoc/generator/darkfish.rb
index 18394a2c34..e961518fcc 100644
--- a/lib/rdoc/generator/darkfish.rb
+++ b/lib/rdoc/generator/darkfish.rb
@@ -698,7 +698,7 @@ class RDoc::Generator::Darkfish
out_file.dirname.mkpath
out_file.open 'w', 0644 do |io|
- io.set_encoding @options.encoding if Object.const_defined? :Encoding
+ io.set_encoding @options.encoding
@context = yield io
@@ -744,8 +744,7 @@ class RDoc::Generator::Darkfish
erbout = 'io'
else
template = file.read
- template = template.encode @options.encoding if
- Object.const_defined? :Encoding
+ template = template.encode @options.encoding
file_var = File.basename(file).sub(/\..*/, '')
@@ -758,4 +757,3 @@ class RDoc::Generator::Darkfish
end
end
-
diff --git a/lib/rdoc/generator/json_index.rb b/lib/rdoc/generator/json_index.rb
index 624a2e512e..931438b3c3 100644
--- a/lib/rdoc/generator/json_index.rb
+++ b/lib/rdoc/generator/json_index.rb
@@ -142,7 +142,7 @@ class RDoc::Generator::JsonIndex
FileUtils.mkdir_p index_file.dirname, :verbose => $DEBUG_RDOC
index_file.open 'w', 0644 do |io|
- io.set_encoding Encoding::UTF_8 if Object.const_defined? :Encoding
+ io.set_encoding Encoding::UTF_8
io.write 'var search_data = '
JSON.dump data, io, 0
@@ -295,4 +295,3 @@ class RDoc::Generator::JsonIndex
end
end
-