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 | 64800005cae50020aa4c5e162fe036e0e0efa7b8 (patch) | |
| tree | bbc267551b60ddec5160915550ae065e0d3bcb2b /cpp/bindings | |
| parent | 3b1c744e37323bb0820791ee1a8885fedfde6192 (diff) | |
| download | qpid-python-64800005cae50020aa4c5e162fe036e0e0efa7b8.tar.gz | |
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
Diffstat (limited to 'cpp/bindings')
| -rw-r--r-- | cpp/bindings/qpid/ruby/lib/qpid_messaging/encoding.rb | 14 |
1 files changed, 1 insertions, 13 deletions
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. |
