Skip to content

Commit 571ae7f

Browse files
committed
Fix backward compatibility since RDoc 6.13.0
Some methods have been removed in ruby/rdoc#1315.
1 parent 56532f6 commit 571ae7f

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

lib/rdoc/generator/template/rorvswild/_sidebar_extends.rhtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<h3>Extended With Modules</h3>
44

55
<ul class="link-list">
6-
<%- klass.each_extend do |ext| -%>
6+
<%- klass.extends.each do |ext| -%>
77
<%- unless String === ext.module then -%>
88
<li><a class="extend" href="<%= klass.aref_to ext.module.path %>"><%= ext.module.full_name %></a>
99
<%- else -%>

lib/rdoc/generator/template/rorvswild/_sidebar_includes.rhtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<h3>Included Modules</h3>
44

55
<ul class="link-list">
6-
<%- klass.each_include do |inc| -%>
6+
<%- klass.includes.each do |inc| -%>
77
<%- unless String === inc.module then -%>
88
<li><a class="include" href="<%= klass.aref_to inc.module.path %>"><%= inc.module.full_name %></a>
99
<%- else -%>

lib/rorvswild_theme_rdoc.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
require "rorvswild_theme_rdoc/patches/rdoc"
2+
require "rorvswild_theme_rdoc/patches/rdoc_before_6.13.0"
23

34
module RorVsWildThemeRdoc
45
end
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
if RDoc::VERSION < "6.13.0"
2+
# https://github.com/ruby/rdoc/pull/1315
3+
module RDoc
4+
class NormalClass
5+
attr_reader :includes
6+
attr_reader :extends
7+
attr_reader :constants
8+
end
9+
end
10+
end

0 commit comments

Comments
 (0)