Return-Path: X-Original-To: apmail-qpid-commits-archive@www.apache.org Delivered-To: apmail-qpid-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 36B2BECA9 for ; Mon, 4 Feb 2013 20:32:28 +0000 (UTC) Received: (qmail 79712 invoked by uid 500); 4 Feb 2013 20:32:28 -0000 Delivered-To: apmail-qpid-commits-archive@qpid.apache.org Received: (qmail 79683 invoked by uid 500); 4 Feb 2013 20:32:28 -0000 Mailing-List: contact commits-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@qpid.apache.org Delivered-To: mailing list commits@qpid.apache.org Received: (qmail 79676 invoked by uid 99); 4 Feb 2013 20:32:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Feb 2013 20:32:28 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Feb 2013 20:32:26 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 813B423889EB; Mon, 4 Feb 2013 20:32:06 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1442337 - /qpid/trunk/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/encoding.rb Date: Mon, 04 Feb 2013 20:32:06 -0000 To: commits@qpid.apache.org From: mcpierce@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130204203206.813B423889EB@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: mcpierce Date: Mon Feb 4 20:32:06 2013 New Revision: 1442337 URL: http://svn.apache.org/viewvc?rev=1442337&view=rev Log: QPID-4565: Fixed the encode method for messages. Modified: qpid/trunk/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/encoding.rb Modified: qpid/trunk/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/encoding.rb URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/encoding.rb?rev=1442337&r1=1442336&r2=1442337&view=diff ============================================================================== --- qpid/trunk/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/encoding.rb (original) +++ qpid/trunk/qpid/cpp/bindings/qpid/ruby/lib/qpid_messaging/encoding.rb Mon Feb 4 20:32:06 2013 @@ -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. --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org For additional commands, e-mail: commits-help@qpid.apache.org