Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
manojmj92 committed Feb 8, 2019
1 parent 64f97b4 commit 21d7a12
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/bugsnag/cleaner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class Cleaner
RECURSION = '[RECURSION]'.freeze
OBJECT = '[OBJECT]'.freeze
RAISED = '[RAISED]'.freeze
OBJECT_WITH_ID_AND_CLASS = '[OBJECT]: [Class]: %{class_name} [ID]: %{id}'.freeze

def initialize(filters)
@filters = Array(filters)
Expand Down Expand Up @@ -49,7 +50,7 @@ def traverse_object(obj, seen, scope)
if str =~ /#<.*>/
# Use id of the object if available
if obj.respond_to?(:id)
obj.id
OBJECT_WITH_ID_AND_CLASS % { class_name: obj.class, id: obj.id }
else
OBJECT
end
Expand Down
2 changes: 1 addition & 1 deletion spec/cleaner_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def id
end
end
a = Macaron.new
expect(subject.clean_object(a)).to eq(a.id)
expect(subject.clean_object(a)).to eq("[OBJECT]: [Class]: #{a.class.name} [ID]: #{a.id}")
end

it "cleans up binary strings properly" do
Expand Down

0 comments on commit 21d7a12

Please sign in to comment.