Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

label cannot be provided as a keyword #5

Closed
ElMassimo opened this issue Mar 20, 2023 · 2 comments · Fixed by #8
Closed

label cannot be provided as a keyword #5

ElMassimo opened this issue Mar 20, 2023 · 2 comments · Fixed by #8

Comments

@ElMassimo
Copy link

The readme mentions:

If you are calling it in a loop, or with different variations, you can include a label on the filename:

flamegraph(label: "rspec") {
  # your code here
}

This is not accurate, as it results in:

     ArgumentError:
       unknown keyword: :label

If the library wants to support both a normal parameter and a keyword arg, it could use:

def flamegraph(_label = nil, label: _label, open: true, ignore_gc: false, interval: 1000, &block)
@technicalpickles
Copy link
Collaborator

Thanks for reporting! I'm not sure which I really intended 🤔

I think I'm alright with keeping it a positional argument, and updating the docs.

@technicalpickles
Copy link
Collaborator

Fixed the docs, and added some tests around this. Included in 0.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants