diff options
| author | Stan Lo <stan001212@gmail.com> | 2023-06-30 18:41:56 +0100 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2023-06-30 17:42:00 +0000 |
| commit | 136fcd5118b844bb8399d69dc44414cb3bd2028a (patch) | |
| tree | dd5fb9e08bf8d97423ad981e71f6ae8fc527f65a /doc | |
| parent | 94788a6d13a136f28daca2a51ad7945c52b2311d (diff) | |
[ruby/irb] Reduce internal operations' exposure to benchmarking
(https://github.com/ruby/irb/pull/618)
* Test last value is assigned with measure enabled
* Remove unnecessary `result` variable
`Context#evaluate` always assigns the result of the evaluation to `_` so
we don't need to do it in `Irb#eval_input`.
* Move benchmarking logic into `Context#evaluate`
Current location of the benchmarking logic is too high up and includes
operations like command loading and argument transformation, which should
be excluded. So this commit moves it into `Context#evaluate` to reduce the
noise.
We don't move it further down to `Workspace#evaluate` because `Context`
is an argument of the measure block, which is not available in `Workspace`.
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions
