Skip to content

Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

SyntaxSuggest::AroundBlockScan#code_block

code_block

Return the currently matched lines as a CodeBlock

When a CodeBlock is created it will gather metadata about itself, so this is not a free conversion. Avoid allocating more CodeBlock’s than needed