BSON::Int64#from_bson test fails on 32-bit arches

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • bson-4.2.2
    • Affects Version/s: None
    • Component/s: BSON
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Trying to update bson on Fedora to the 4.2.1 version, I experiencing following error on 32 bit architectures:

        1) BSON::Int64#from_bson when the integer is within the MRI Fixnum range when using MRI deserializes to a Fixnum object
           Failure/Error: expect(described_class.from_bson(bson).class).to be(Fixnum)
             expected #<Class:1071232452> => Fixnum
                  got #<Class:1071230868> => Bignum
             Compared using equal?, which compares object identity,
             but expected and actual are not the same object. Use
             `expect(actual).to eq(expected)` if you don't care about
             object identity in this example.
             Diff:
             @@ -1,2 +1,2 @@
             -Fixnum
             +Bignum
           # ./spec/bson/int64_spec.rb:83:in `block (5 levels) in <top (required)>'
      

      This test was introduced as part of RUBY-1189.

            Assignee:
            Emily Stolfo (Inactive)
            Reporter:
            Vít Ondruch
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: