class YARP::LexCompat::IgnoredNewlineToken

Ignored newlines can occasionally have a LABEL state attached to them, so we compare the state differently here.

Public Instance Methods

==(other) click to toggle source
# File yarp/lex_compat.rb, line 235
def ==(other)
  return false unless self[0...-1] == other[0...-1]

  if self[4] == Ripper::EXPR_ARG | Ripper::EXPR_LABELED
    other[4] & Ripper::EXPR_ARG | Ripper::EXPR_LABELED > 0
  else
    self[4] == other[4]
  end
end