Skip to content

Measure command without ruby arg#962

Open
tompng wants to merge 2 commits into
ruby:masterfrom
tompng:measure_command_without_ruby_arg
Open

Measure command without ruby arg#962
tompng wants to merge 2 commits into
ruby:masterfrom
tompng:measure_command_without_ruby_arg

Conversation

@tompng

@tompng tompng commented May 26, 2024

Copy link
Copy Markdown
Member

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

1 participant