End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
SyntaxSuggest::CodeLine#trailing_slash?
trailing_slash?
lib/syntax_suggest/code_line.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/syntax_suggest/code_line.rb, line 185
def trailing_slash?
last = @lex.last
return false unless last
return false unless last.type == :on_sp
last.token == TRAILING_SLASH
end
Determines if the given line has a trailing slash
lines = CodeLine.from_source(<<~EOM) it "foo" \ EOM expect(lines.first.trailing_slash?).to eq(true)