Skip to content

Commit b80ce40

Browse files
committed
Pass reference to exception notifier blocks
1 parent 3c7c939 commit b80ce40

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/exception_notifier/email_notifier.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ def load_custom_views
130130
end
131131

132132
def maybe_call(maybe_proc)
133-
maybe_proc.respond_to?(:call) ? maybe_proc.call : maybe_proc
133+
return maybe_proc unless maybe_proc.respond_to?(:call)
134+
(maybe_proc.arity == 0) ? maybe_proc.call : maybe_proc.call(self)
134135
end
135136
end
136137
end

0 commit comments

Comments
 (0)