Skip to content

Commit

Permalink
Fix instance variable @versions_to_* not initialized warning
Browse files Browse the repository at this point in the history
Fixes carrierwaveuploader#2493, Closes carrierwaveuploader#2506
Memoizing @versions_to_* is unsafe since versions can change dynamically when conditional version is used.
  • Loading branch information
mshibuya authored and joemsak committed Mar 27, 2021
1 parent a2d8baf commit a5dd25c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/carrierwave/uploader/versions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module Versions
prepend Module.new {
def initialize(*)
super
@versions = nil
@versions, @versions_to_cache, @versions_to_store = nil
end
}
end
Expand Down

0 comments on commit a5dd25c

Please sign in to comment.