Skip to content

Type error with Rails 7.0.2 and Ruby 3.1.1 #47

@eromas

Description

@eromas

Hello there,
I get:

TypeError at /documents can't dump IO.

mongo_session_store (3.2.1) lib/mongo_session_store/mongoid_store.rb, line 17

   store_in collection: MongoSessionStore.collection_name

    field :_data, type: BSON::Binary, default: -> { pack({}) }

    def self.pack(data)

17 BSON::Binary.new(Marshal.dump(data), :generic)

    end

Note:
This error does not appear with Rails 6.1.4.6 and Ruby 3.1.1

PS:
This error appears if params[...] is stored to mongoid session store.
It does not appear if params[...].to_enum.to_h is stored to mongoid session store instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions