Skip to content

Commit fdb8133

Browse files
committed
Avoid unnecessary object allocations.
1 parent ef2af75 commit fdb8133

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/honeybadger.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ def build_lookup_hash_for(exception, options = {})
129129
result
130130
end
131131

132-
def context(hash = {})
132+
def context(hash = nil)
133133
Thread.current[:honeybadger_context] ||= {}
134-
Thread.current[:honeybadger_context].merge!(hash)
134+
Thread.current[:honeybadger_context].merge!(hash) unless hash.nil?
135135
self
136136
end
137137

0 commit comments

Comments
 (0)