From 64800005cae50020aa4c5e162fe036e0e0efa7b8 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/qpid@1442337 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/bindings/qpid/ruby/lib/qpid_messaging/encoding.rb | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'cpp/bindings') diff --git a/cpp/bindings/qpid/ruby/lib/qpid_messaging/encoding.rb b/cpp/bindings/qpid/ruby/lib/qpid_messaging/encoding.rb index 28475f84fd..ce9392001a 100644 --- a/cpp/bindings/qpid/ruby/lib/qpid_messaging/encoding.rb +++ b/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