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

Measure command without ruby arg #962

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tompng
Copy link
Member

@tompng tompng commented May 26, 2024

To align with other command usage, and to reduce use of ruby_args, this pull request adds

measure on
measure foo
measure off time

and deprecates

measure :on
measure :foo
measure :off, :time

and also adds missing test for measure proc arguments.

Other changes

Type of arg will change to string | nil. Previously, any object was possible.

measure :custom_measure_method, Object.new
# ↓
measure custom_measure_method string_args

I think this does not break existing code because I couldn't find any code using custom MEASURE_PROC.
https://github.com/search?q=%22IRB.conf%5B%3AMEASURE_PROC%5D%22+NOT+is%3Afork+language%3ARuby&type=code

@tompng tompng force-pushed the measure_command_without_ruby_arg branch from ef881a8 to 73b7693 Compare July 19, 2024 18:45
@tompng tompng mentioned this pull request Jul 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant