summaryrefslogtreecommitdiff
path: root/test/prism/errors
diff options
context:
space:
mode:
authorEarlopain <14981592+Earlopain@users.noreply.github.com>2025-11-26 16:13:04 +0100
committergit <svn-admin@ruby-lang.org>2025-11-29 19:01:11 +0000
commit48a73303e45b1dbaa3422e14e35c7834db98be4d (patch)
treedd52c7477a5527e90b16c6181dc2c785f4b15eca /test/prism/errors
parent8a0ae3a71a8b12a5e5929a565ba98fdf7c16233b (diff)
[ruby/prism] Optimize `Prism::Source#find_line`
This is more concise and ruby does a better job performance-wise. This used to be `bsearch_index` already but https://github.com/ruby/prism/commit/6d8358c08395438d5924777c1fc3001a5ebf0aa3 changed it. https://github.com/ruby/prism/pull/1733#discussion_r1373702087 said: > Yeah the edge case was that the value matched an element exactly But surely there would be a test to show this behaviour? Gets called as part of pretty-printing nodes. Further reduces the time for `SnapshotsTest` by ~16% for me. https://github.com/ruby/prism/commit/f448e2b995
Diffstat (limited to 'test/prism/errors')
0 files changed, 0 insertions, 0 deletions