Skip to content

scope does not like false #1099

Open
Open
@blowfishpro

Description

@blowfishpro

Steps to reproduce:

Try to add some scope with a false value:

Rollbar.scoped(example: false) { Rollbar.error(Exception.new) }

Observed:

  • the example key does not appear on the exception
  • If you use any other truthy value (including true, numbers, or anthing else other than nil) it sends correctely

Desired:

  • false and true are treated the same way. Maybe nil is different?

Notes:

  • The behavior comes from this line - that condition is falsy with false or nil so nothing is done
  • Maybe the behavior of false and nil should be thought about here? To me false should be merged in like a normal value and nil indicates that we want to remove that value in the merged hash. But maybe others feel differently?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions