Skip to content

Commit

Permalink
Use IO.biread to simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
okkez committed Feb 20, 2016
1 parent 3ba1bd9 commit c863eac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/hiki/storage/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def load_cache( page )
cache_path = "#{@conf.cache_path}/parser"
Dir.mkdir( cache_path ) unless test( ?e, cache_path )
begin
tmp = Marshal.load( File.open( "#{cache_path}/#{escape(page)}".untaint, 'rb' ) {|f| f.read} )
tmp = Marshal.load(File.binread("#{cache_path}/#{escape(page)}".untaint))
if tmp[0] == Hiki::RELEASE_DATE
return tmp[1]
else
Expand Down

0 comments on commit c863eac

Please sign in to comment.