Qpid Proton
  1. Qpid Proton
  2. PROTON-376

Ruby does not properly encode a map into a Data instance.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.5
    • Component/s: proton-c
    • Labels:
      None

      Description

      When attempting to automatically put an instance of ::Hash into a Data object, the following error message is shown instead:

      /home/mcpierce/Programming/Proton/proton-c/bindings/ruby/lib/qpid_proton/mapping.rb:73:in `put': undefined method `map=' for #<Qpid::Proton::Data:0x00000002aa41f8> (NoMethodError)
      from /home/mcpierce/Programming/Proton/proton-c/bindings/ruby/lib/qpid_proton/message.rb:71:in `pre_encode'
      from /home/mcpierce/Programming/Proton/proton-c/bindings/ruby/lib/qpid_proton/messenger.rb:200:in `put'
      from ../examples/messenger/ruby/send.rb:50:in `block in <main>'
      from ../examples/messenger/ruby/send.rb:44:in `each'
      from ../examples/messenger/ruby/send.rb:44:in `<main>'

        Activity

        Darryl L. Pierce created issue -
        Hide
        ASF subversion and git services added a comment -

        Commit 1508620 from Darryl L. Pierce in branch 'proton/trunk'
        [ https://svn.apache.org/r1508620 ]

        PROTON-376: Fix how a ::hash is automatically added to Data in Ruby

        Added a singleton method to the Qpid::Proton::MAP mapping object to take
        the ::hash instance and put it into the Data instance. Properly handles
        a nil value as well.

        Show
        ASF subversion and git services added a comment - Commit 1508620 from Darryl L. Pierce in branch 'proton/trunk' [ https://svn.apache.org/r1508620 ] PROTON-376 : Fix how a ::hash is automatically added to Data in Ruby Added a singleton method to the Qpid::Proton::MAP mapping object to take the ::hash instance and put it into the Data instance. Properly handles a nil value as well.
        Darryl L. Pierce made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 0.5 [ 12324004 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Darryl L. Pierce
            Reporter:
            Darryl L. Pierce
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development