Permalink
Browse files

Merge pull request #10 from Gurpartap/patch-1

Use write instead of send
  • Loading branch information...
2 parents ce32ef7 + 402f1e2 commit 1f9e2b278a4086f0c3248d483410ed3e20ef18a2 @tarcieri tarcieri committed Aug 15, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/celluloid/zmq/sockets.rb
@@ -78,14 +78,15 @@ def read(buffer = '')
# Writable 0MQ sockets have a send method
module WritableSocket
# Send a message to the socket
- def send(*messages)
+ def write(*messages)
unless ::ZMQ::Util.resultcode_ok? @socket.send_strings messages.flatten
raise IOError, "error sending 0MQ message: #{::ZMQ::Util.error_string}"
end
messages
end
- alias_method :<<, :send
+ alias_method :<<, :write
+ alias_method :send, :write # deprecated
end
# ReqSockets are the counterpart of RepSockets (REQ/REP)

0 comments on commit 1f9e2b2

Please sign in to comment.