ruby-changes:71312
From: Kazuhiro <ko1@a...>
Date: Wed, 2 Mar 2022 14:01:44 +0900 (JST)
Subject: [ruby-changes:71312] fd2e1d3c4a (master): [ruby/rdoc] Use `Marshal.load io` instead of `Marshal.load io.read`
https://git.ruby-lang.org/ruby.git/commit/?id=fd2e1d3c4a From fd2e1d3c4a0e248f710bc8f3abe94f343552026d Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA <zn@m...> Date: Wed, 2 Mar 2022 13:05:36 +0900 Subject: [ruby/rdoc] Use `Marshal.load io` instead of `Marshal.load io.read` https://github.com/ruby/rdoc/commit/135198a31c --- lib/rdoc/store.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/rdoc/store.rb b/lib/rdoc/store.rb index 5ba671ca1b..9fc540d317 100644 --- a/lib/rdoc/store.rb +++ b/lib/rdoc/store.rb @@ -557,7 +557,7 @@ class RDoc::Store https://github.com/ruby/ruby/blob/trunk/lib/rdoc/store.rb#L557 #orig_enc = @encoding File.open cache_path, 'rb' do |io| - @cache = Marshal.load io.read + @cache = Marshal.load io end load_enc = @cache[:encoding] @@ -616,7 +616,7 @@ class RDoc::Store https://github.com/ruby/ruby/blob/trunk/lib/rdoc/store.rb#L616 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) @@ -631,7 +631,7 @@ class RDoc::Store https://github.com/ruby/ruby/blob/trunk/lib/rdoc/store.rb#L631 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 @@ -651,7 +651,7 @@ class RDoc::Store https://github.com/ruby/ruby/blob/trunk/lib/rdoc/store.rb#L651 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 -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/