Class: Gem::SafeMarshal::Reader
- Inherits:
-
Object
- Object
- Gem::SafeMarshal::Reader
- Defined in:
- lib/rubygems/safe_marshal/reader.rb
Defined Under Namespace
Classes: EOFError, Error, NotImplementedError, UnconsumedBytesError, UnsupportedVersionError
Instance Method Summary collapse
-
#initialize(io) ⇒ Reader
constructor
A new instance of Reader.
- #read! ⇒ Object
Constructor Details
#initialize(io) ⇒ Reader
Returns a new instance of Reader.
23 24 25 |
# File 'lib/rubygems/safe_marshal/reader.rb', line 23 def initialize(io) @io = io end |
Instance Method Details
#read! ⇒ Object
27 28 29 30 31 32 |
# File 'lib/rubygems/safe_marshal/reader.rb', line 27 def read! read_header root = read_element raise UnconsumedBytesError unless @io.eof? root end |