Skip to content

Commit

Permalink
Simplify StacktraceInterface's inspection result
Browse files Browse the repository at this point in the history
  • Loading branch information
st0012 committed Nov 5, 2021
1 parent 9f195d7 commit ec291c5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sentry-ruby/lib/sentry/interfaces/stacktrace.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ def to_hash
{ frames: @frames.map(&:to_hash) }
end

def inspect
@frames.map(&:to_s)
end

private

# Not actually an interface, but I want to use the same style
Expand All @@ -28,6 +32,10 @@ def initialize(project_root, line)
@filename = compute_filename
end

def to_s
"#{@filename}:#{@lineno}"
end

def compute_filename
return if abs_path.nil?

Expand Down

0 comments on commit ec291c5

Please sign in to comment.