lib/celluloid/zmq/socket/readable.rb in celluloid-zmq-0.17.0 vs lib/celluloid/zmq/socket/readable.rb in celluloid-zmq-0.17.2

- old
+ new

@@ -16,15 +16,15 @@ self.linger = @linger super(addr) end # Read a message from the socket - def read(buffer = '') + def read(buffer = "") ZMQ.wait_readable(@socket) if ZMQ.evented? unless result_ok? @socket.recv_string buffer - raise IOError, "error receiving ZMQ string: #{::ZMQ::Util.error_string}" + fail IOError, "error receiving ZMQ string: #{::ZMQ::Util.error_string}" end buffer end # Multiparts message ? @@ -34,10 +34,10 @@ # the buffer. def read_multipart(buffer = []) ZMQ.wait_readable(@socket) if ZMQ.evented? unless result_ok? @socket.recv_strings buffer - raise IOError, "error receiving ZMQ string: #{::ZMQ::Util.error_string}" + fail IOError, "error receiving ZMQ string: #{::ZMQ::Util.error_string}" end buffer end end end