Class: Squash::Symbolicator::Symbol

Inherits:
Object
  • Object
show all
Includes:
SerialBox
Defined in:
lib/squash/symbolicator/symbols.rb

Overview

An address ranged mapped to a symbol (method or function name), as part of a Symbols aggregation. The file and line where the symbol is declared is also included.

Instance Method Summary collapse

Instance Method Details

#<=>(other) ⇒ Object

Raises:

  • (ArgumentError)


29
30
31
32
33
34
35
36
# File 'lib/squash/symbolicator/symbols.rb', line 29

def <=>(other)
  raise ArgumentError unless other.kind_of?(Squash::Symbolicator::Symbol)
  if start_address == other.start_address
    end_address <=> other.end_address
  else
    start_address <=> other.start_address
  end
end