Skip to content

Commit a727f09

Browse files
raosushhsbt
authored andcommitted
Marshal: Support type parameters for classes_modules
1 parent 4bf209e commit a727f09

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/rdoc/class_module.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,8 @@ def marshal_dump # :nodoc:
342342
tl.relative_name
343343
end,
344344
parent.full_name,
345-
parent.class,
346-
]
345+
parent.class
346+
].concat(type_parameters)
347347
end
348348

349349
def marshal_load array # :nodoc:
@@ -428,6 +428,7 @@ def marshal_load array # :nodoc:
428428

429429
@parent_name = array[12]
430430
@parent_class = array[13]
431+
@type_parameters = array[14] if array[14]
431432
end
432433

433434
##

lib/rdoc/type_parameter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module RDoc
22
class TypeParameter < CodeObject
33
attr_reader :name, :variance, :unchecked, :upper_bound
44

5-
MARSHAL_VERSION = 3 # :nodoc:
5+
MARSHAL_VERSION = 0 # :nodoc:
66

77
def initialize(name, variance, unchecked = false, upper_bound = nil)
88
@name = name

0 commit comments

Comments
 (0)