examples/put1_c.rb in rubywmq-2.0.2 vs examples/put1_c.rb in rubywmq-2.1.0
- old
+ new
@@ -1,16 +1,16 @@
#
# Sample : put() : Put a single request message to a queue
#
-require 'rubygems'
require 'wmq'
-WMQ::QueueManager.connect(:q_mgr_name=>'REID') do |qmgr|
- message = WMQ::Message.new
+WMQ::QueueManager.connect(q_mgr_name: 'REID') do |qmgr|
+ message = WMQ::Message.new
message.data = 'Hello World'
message.descriptor = {
- :msg_type=> WMQ::MQMT_REQUEST,
- :reply_to_q=>'TEST.REPLY.QUEUE'}
+ msg_type: WMQ::MQMT_REQUEST,
+ reply_to_q: 'TEST.REPLY.QUEUE'
+ }
- qmgr.put(:q_name=>'TEST.QUEUE', :message => message)
+ qmgr.put(q_name: 'TEST.QUEUE', message: message)
end