Method: IcAgent::Candid.safe_read
- Defined in:
- lib/ic_agent/candid.rb
.safe_read(pipe, num) ⇒ Object
1376 1377 1378 1379 1380 |
# File 'lib/ic_agent/candid.rb', line 1376 def self.safe_read(pipe, num) raise ArgumentError, 'unexpected end of buffer' if pipe.length < num pipe.read(num) end |