diff options
Diffstat (limited to 'qpid/cpp')
| -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. |
