context: fix original context not being restored

This commit is contained in:
Eric Knibbe 2024-07-08 13:18:18 -04:00
parent d31150adf3
commit e81e811d56
No known key found for this signature in database
GPG Key ID: 179D9CDDDB814168

View File

@ -63,7 +63,7 @@ module Context
end
def with_context(**options)
old_context = Thread.current[:context]
old_context = Context.current
new_context = ContextStruct.new(
debug: options.fetch(:debug, old_context&.debug?),