Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
SyntaxSuggest::AroundBlockScan#scan_neighbors_not_empty
scan_neighbors_not_empty
lib/syntax_suggest/around_block_scan.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/lib/syntax_suggest/around_block_scan.rb, line 188
def scan_neighbors_not_empty
@target_indent = @orig_indent
scan_while { |line| line.not_empty? && line.indent >= @target_indent }
end
Finds code lines at the same or greater indentation and adds them to the block
See also
#scan_adjacent_indent
#scan_while
#lookahead_balance_one_line
#stop_after_kw
also in
4.0 · 3.3