class Gem::SafeMarshal::Reader

Public Class Methods

# File lib/rubygems/safe_marshal/reader.rb, line 29
def initialize(io)
  @io = io
end

Public Instance Methods

# File lib/rubygems/safe_marshal/reader.rb, line 33
def read!
  read_header
  root = read_element
  raise UnconsumedBytesError, "expected EOF, got #{@io.read(10).inspect}... after top-level element #{root.class}" unless @io.eof?
  root
end