Skip to content

Commit

Permalink
Fix init of memoization cache
Browse files Browse the repository at this point in the history
  • Loading branch information
svoop committed Nov 12, 2023
1 parent 026863d commit cb5dfb1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## Main

Nothing so far
#### Fixes
* Fix init of memoization cache

## 0.4.0

Expand Down
2 changes: 1 addition & 1 deletion lib/rodbot/memoize.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class << self

def included(base)
base.extend(ClassMethods)
@cache = {}
@cache ||= {}
end

%i(suspend revisit).each do |switch|
Expand Down

0 comments on commit cb5dfb1

Please sign in to comment.