Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Marshal.load io instead of Marshal.load io.read #870

Merged
merged 1 commit into from
Mar 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/rdoc/store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ def load_cache
#orig_enc = @encoding

File.open cache_path, 'rb' do |io|
@cache = Marshal.load io.read
@cache = Marshal.load io
end

load_enc = @cache[:encoding]
Expand Down Expand Up @@ -616,7 +616,7 @@ def load_class_data klass_name
file = class_file klass_name

File.open file, 'rb' do |io|
Marshal.load io.read
Marshal.load io
end
rescue Errno::ENOENT => e
error = MissingFileError.new(self, file, klass_name)
Expand All @@ -631,7 +631,7 @@ def load_method klass_name, method_name
file = method_file klass_name, method_name

File.open file, 'rb' do |io|
obj = Marshal.load io.read
obj = Marshal.load io
obj.store = self
obj.parent =
find_class_or_module(klass_name) || load_class(klass_name) unless
Expand All @@ -651,7 +651,7 @@ def load_page page_name
file = page_file page_name

File.open file, 'rb' do |io|
obj = Marshal.load io.read
obj = Marshal.load io
obj.store = self
obj
end
Expand Down