lib/bullet.rb in bullet-5.1.0 vs lib/bullet.rb in bullet-5.1.1
- old
+ new
@@ -188,20 +188,25 @@
warnings
end
end
def profile
+ return_value = nil
if Bullet.enable?
begin
Bullet.start_request
- yield
+ return_value = yield
Bullet.perform_out_of_channel_notifications if Bullet.notification?
ensure
Bullet.end_request
end
+ else
+ return_value = yield
end
+
+ return_value
end
private
def for_each_active_notifier_with_notification
UniformNotifier.active_notifiers.each do |notifier|