mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
ee83dc3fe4
commit
98c7058bf7
94 changed files with 983 additions and 466 deletions
|
|
@ -116,6 +116,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+
|
||||
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue