lib/console/capture.rb in console-1.23.2 vs lib/console/capture.rb in console-1.23.3
- old
+ new
@@ -1,9 +1,9 @@
# frozen_string_literal: true
# Released under the MIT License.
-# Copyright, 2019-2022, by Samuel Williams.
+# Copyright, 2019-2023, by Samuel Williams.
require_relative 'filter'
module Console
# A general sink which captures all events into a buffer.
@@ -51,9 +51,13 @@
message[:subject] = subject
end
if arguments.any?
message[:arguments] = arguments
+ end
+
+ if annotation = Fiber.current.annotation
+ message[:annotation] = annotation
end
if block_given?
if block.arity.zero?
message[:message] = yield