diff options
| author | Darryl L. Pierce <mcpierce@apache.org> | 2013-02-04 20:32:06 +0000 |
|---|---|---|
| committer | Darryl L. Pierce <mcpierce@apache.org> | 2013-02-04 20:32:06 +0000 |
| commit | 92148bb2c44311cb647241ffa8510a1220c76dd9 (patch) | |
| tree | 4d18420523057542fb5a1cd9c2d63f361b432df7 /qpid/cpp/bindings | |
| parent | 1636925b841cbb6e7c756bcbeb6775f235344d8d (diff) | |
| download | qpid-python-92148bb2c44311cb647241ffa8510a1220c76dd9.tar.gz | |
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
Diffstat (limited to 'qpid/cpp/bindings')
| -rw-r--r-- | qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/encoding.rb | 14 |
1 files changed, 1 insertions, 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. |
