summaryrefslogtreecommitdiff
path: root/lib/rdoc/store.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-26 05:56:26 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-26 05:56:26 +0000
commit98c7058bf7b3eab91c62a77cb10b09f6c8ed368e (patch)
treea90e594c950a1e3160a69f90a9e6215242937ef7 /lib/rdoc/store.rb
parentee83dc3fe49ac23321a055a2a4b337499d2494eb (diff)
Merge RDoc 6.0.3 from upstream.
It fixed the several bugs that was found after RDoc 6 releasing. From: SHIBATA Hiroshi <hsbt@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/store.rb')
-rw-r--r--lib/rdoc/store.rb25
1 files changed, 17 insertions, 8 deletions
diff --git a/lib/rdoc/store.rb b/lib/rdoc/store.rb
index 999aa76f92..b7e677abf9 100644
--- a/lib/rdoc/store.rb
+++ b/lib/rdoc/store.rb
@@ -117,6 +117,11 @@ class RDoc::Store
attr_accessor :encoding
##
+ # The lazy constants alias will be discovered in passing
+
+ attr_reader :unmatched_constant_alias
+
+ ##
# Creates a new Store of +type+ that will load or save to +path+
def initialize path = nil, type = nil
@@ -152,6 +157,8 @@ class RDoc::Store
@unique_classes = nil
@unique_modules = nil
+
+ @unmatched_constant_alias = {}
end
##
@@ -539,7 +546,7 @@ class RDoc::Store
def load_cache
#orig_enc = @encoding
- open cache_path, 'rb' do |io|
+ File.open cache_path, 'rb' do |io|
@cache = Marshal.load io.read
end
@@ -585,6 +592,8 @@ class RDoc::Store
case obj
when RDoc::NormalClass then
@classes_hash[klass_name] = obj
+ when RDoc::SingleClass then
+ @classes_hash[klass_name] = obj
when RDoc::NormalModule then
@modules_hash[klass_name] = obj
end
@@ -596,7 +605,7 @@ class RDoc::Store
def load_class_data klass_name
file = class_file klass_name
- open file, 'rb' do |io|
+ File.open file, 'rb' do |io|
Marshal.load io.read
end
rescue Errno::ENOENT => e
@@ -611,7 +620,7 @@ class RDoc::Store
def load_method klass_name, method_name
file = method_file klass_name, method_name
- open file, 'rb' do |io|
+ File.open file, 'rb' do |io|
obj = Marshal.load io.read
obj.store = self
obj.parent =
@@ -631,7 +640,7 @@ class RDoc::Store
def load_page page_name
file = page_file page_name
- open file, 'rb' do |io|
+ File.open file, 'rb' do |io|
obj = Marshal.load io.read
obj.store = self
obj
@@ -778,7 +787,7 @@ class RDoc::Store
marshal = Marshal.dump @cache
- open cache_path, 'wb' do |io|
+ File.open cache_path, 'wb' do |io|
io.write marshal
end
end
@@ -854,7 +863,7 @@ class RDoc::Store
marshal = Marshal.dump klass
- open path, 'wb' do |io|
+ File.open path, 'wb' do |io|
io.write marshal
end
end
@@ -879,7 +888,7 @@ class RDoc::Store
marshal = Marshal.dump method
- open method_file(full_name, method.full_name), 'wb' do |io|
+ File.open method_file(full_name, method.full_name), 'wb' do |io|
io.write marshal
end
end
@@ -901,7 +910,7 @@ class RDoc::Store
marshal = Marshal.dump page
- open path, 'wb' do |io|
+ File.open path, 'wb' do |io|
io.write marshal
end
end