mirror of
https://github.com/ruby/ruby.git
synced 2026-07-29 22:34:58 +08:00
parse_expression_terminator runs after every infix operator and called pm_block_call_p, which walks the whole receiver chain, even when the binding power alone already decided the result. Check the binding power first; pm_block_call_p is pure, so the condition is unchanged. Parsing "a" followed by 8000 ".b" links drops from 44.8ms to 0.46ms. https://github.com/ruby/prism/commit/8a40a928a8 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>