Method: Parser::Source::Comment#==

Defined in:
lib/parser/source/comment.rb

#==(other) ⇒ Boolean

Compares comments. Two comments are equal if they correspond to the same source range.

Parameters:

  • other (Object)

Returns:

  • (Boolean)
[View source]

120
121
122
123
# File 'lib/parser/source/comment.rb', line 120

def ==(other)
  other.is_a?(Source::Comment) &&
    @location == other.location
end