Class: IO
- Inherits:
-
Object
- Object
- IO
- Defined in:
- lib/core.rb
Instance Method Summary collapse
Instance Method Details
#readpartial_rescued(size) ⇒ Object
48 49 50 51 52 |
# File 'lib/core.rb', line 48 def readpartial_rescued(size) readpartial(size) rescue EOFError nil end |
#while_reading(data = nil, &b) ⇒ Object
40 41 42 43 44 45 46 |
# File 'lib/core.rb', line 40 def while_reading(data = nil, &b) while buf = readpartial_rescued(1024) data << buf if data yield buf if block_given? end data end |