Skip to content

Commit 490804f

Browse files
Merge pull request rails#48125 from jonathanhefner/message_pack-cache-serializer-silence-warning
Silence msgpack warnings when detecting format
2 parents c94760c + bbedd4f commit 490804f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

activesupport/lib/active_support/cache/serializer_with_fallback.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# frozen_string_literal: true
22

3+
require "active_support/core_ext/kernel/reporting"
4+
35
module ActiveSupport
46
module Cache
57
module SerializerWithFallback # :nodoc:
@@ -207,7 +209,7 @@ def dumped?(dumped)
207209
private
208210
def available?
209211
return @available if defined?(@available)
210-
require "active_support/message_pack"
212+
silence_warnings { require "active_support/message_pack" }
211213
@available = true
212214
rescue LoadError
213215
@available = false

0 commit comments

Comments
 (0)