test/sample_ipc_client.rb in avro-1.3.0 vs test/sample_ipc_client.rb in avro-1.3.3
- old
+ new
@@ -64,12 +64,11 @@
'to' => ARGV[0],
'from' => ARGV[1],
'body' => ARGV[2]
}
- num_messages = ARGV[3].to_i
- num_message = 1 if num_messages == 0
+ num_messages = (ARGV[3] || 1).to_i
# build the parameters for the request
params = {'message' => message}
# send the requests and print the result
@@ -81,6 +80,6 @@
# try out a replay message
requestor = make_requestor('localhost', 9090, MAIL_PROTOCOL)
result = requestor.request('replay', {})
puts("Replay Result: " + result)
-end
\ No newline at end of file
+end