Skip to content

Commit

Permalink
Merge pull request #318 from iberianpig/fix/searcher-context_with
Browse files Browse the repository at this point in the history
fix: restore context after block.call
  • Loading branch information
iberianpig authored Jan 27, 2024
2 parents 8d70616 + 606b17d commit 5bceddd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/fusuma/config/searcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ class << self
def with_context(context, &block)
@context = context || {}
result = block.call
ensure # NOTE: ensure is called even if return in block
@context = {}
result
end
Expand Down

0 comments on commit 5bceddd

Please sign in to comment.