Skip to content

Commit

Permalink
Merge pull request #1222 from DataDog/fix_resque
Browse files Browse the repository at this point in the history
hotfix: fix if statement
  • Loading branch information
marcotc authored Oct 28, 2020
2 parents 984262c + 589c8bc commit c0560d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/ddtrace/tracer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def trace(name, options = {})
# SignalException::Interrupt would still bubble up.
# rubocop:disable Metrics/BlockNesting
rescue Exception => e
if (on_error_handler = options[:on_error] && on_error_handler.respond_to?(:call))
if (on_error_handler = options[:on_error]) && on_error_handler.respond_to?(:call)
begin
on_error_handler.call(span, e)
rescue
Expand Down
2 changes: 1 addition & 1 deletion spec/ddtrace/tracer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@
end.to raise_error(error)

expect(spans).to have(1).item
expect(spans[0]).to have_error
expect(spans[0]).to_not have_error
end
end

Expand Down

0 comments on commit c0560d2

Please sign in to comment.