Uploaded image for project: 'Couchbase Ruby client library'
  1. Couchbase Ruby client library
  2. RCBC-71

Calling incorrect methods on MultiJson when format is :document causing Couchbase::Error::ValueFormat

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.0.dp6
    • Fix Version/s: None
    • Component/s: library
    • Security Level: Public
    • Labels:
      None

      Description

      The C code calls dump/load on MultiJson, but its interface is encode/decode. Adding the following hack allows me to .set when the format is :document.

      module MultiJson
      class << self
      alias_method :dump, :encode
      alias_method :load, :decode
      end
      end

      No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

        Hide
        avsej Sergey Avseyev added a comment -

        What multi-json version are you using? There is fix for that already included. I guess it doesn't meet condition for you. Could you please check it? https://github.com/couchbase/couchbase-ruby-client/blob/master/lib/ext/multi_json_fix.rb#L40-L47

        Show
        avsej Sergey Avseyev added a comment - What multi-json version are you using? There is fix for that already included. I guess it doesn't meet condition for you. Could you please check it? https://github.com/couchbase/couchbase-ruby-client/blob/master/lib/ext/multi_json_fix.rb#L40-L47
        Hide
        avsej Sergey Avseyev added a comment -

        I see typo there

        MultiJson.respond_to?(:encode) && MultiJson.respond_to?(:encode)

        But I don't think it cause the issue

        Show
        avsej Sergey Avseyev added a comment - I see typo there MultiJson.respond_to?(:encode) && MultiJson.respond_to?(:encode) But I don't think it cause the issue
        Show
        avsej Sergey Avseyev added a comment - http://review.couchbase.org/21754

          People

          • Assignee:
            avsej Sergey Avseyev
            Reporter:
            chrismcg Chris McGrath
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Gerrit Reviews

              There are no open Gerrit changes