End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
SyntaxSuggest::BlockExpand#expand_neighbors
expand_neighbors(block)
lib/syntax_suggest/block_expand.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/syntax_suggest/block_expand.rb, line 54
def expand_neighbors(block)
expanded_lines = AroundBlockScan.new(code_lines: @code_lines, block: block)
.skip(:hidden?)
.stop_after_kw
.scan_neighbors
.scan_while { |line| line.empty? } # Slurp up empties
.lines
if block.lines == expanded_lines
nil
else
CodeBlock.new(lines: expanded_lines)
end
end
No documentation available