diff options
author | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-09-07 22:23:38 +0000 |
---|---|---|
committer | hsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-09-07 22:23:38 +0000 |
commit | ba6ae341bab83dfc7a624c5bf20d8d162dacaff9 (patch) | |
tree | 540581a54cefcdc817577f646f09372f7e9936d1 /lib/rdoc/generator | |
parent | bf51c067b92361007a57909c539591d3d00cdbd8 (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/generator')
-rw-r--r-- | lib/rdoc/generator/darkfish.rb | 6 | ||||
-rw-r--r-- | lib/rdoc/generator/json_index.rb | 3 |
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 - |