From 92148bb2c44311cb647241ffa8510a1220c76dd9 Mon Sep 17 00:00:00 2001 From: "Darryl L. Pierce" Date: Mon, 4 Feb 2013 20:32:06 +0000 Subject: QPID-4565: Fixed the encode method for messages. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1442337 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/encoding.rb | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/encoding.rb b/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/encoding.rb index 28475f84fd..ce9392001a 100644 --- a/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/encoding.rb +++ b/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/encoding.rb @@ -23,19 +23,7 @@ module Qpid # Encodes the supplied content into the given message. def self.encode content, message, encoding = nil - prepared = content - case content - when Hash - prepared = {} - content.each_pair do |key,value| - prepared[key.to_s] = value.to_s - end - Cqpid::encode prepared, message.message_impl - when Array - prepared = [] - content.each {|value| prepared << value.to_s} - Cqpid::encode prepared, message.message_impl - end + Cqpid::encode content, message.message_impl, encoding end # Decodes and returns the message's content. -- cgit v1.2.1