Skip to content

Make with_indifferent_access optional #113

@godfat

Description

@godfat

This is a feature request that we could choose to not use with_indifferent_access.
We're running several processes, and some would load rails, and some would not.
Current with this would give us different results upon different context, which I think
it's quite bad:

if result.first.respond_to?(:with_indifferent_access)
  output.map(&:with_indifferent_access)
else
  output.each(&INDIFFERENTIATOR)
end

Can we have an option like:

Que.hash_mode = :INDIFFERENTIATOR
Que.hash_mode = :with_indifferent_access
Que.hash_mode = :off # to turn it off completely
Que.hash_mode = :auto # could be what we have not

So that we could make this more deterministic?
Thanks!

/cc @mz026

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