Skip to content

Event.to_hash sometimes contains anonymous modules or classes, which cannot be dumped to YAML #511

@nateberkopec

Description

@nateberkopec

It's common to have code like this:

SentryJob = Struct.new(:event) do
  def perform
    Raven.send_event(event)
  end
end

Raven.configure do |config|
  config.async = lambda { |event|
    Delayed::Job.enqueue SentryJob.new(event.to_hash)
  }
end

event.to_hash can contain an anonymous module, which cannot be dumped to YAML formats for use in a job processor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions