From 76c677a783f2d6b77e24e8c0bf842f72859cad53 Mon Sep 17 00:00:00 2001 From: Ryan Bigg Date: Wed, 24 Jun 2020 10:53:56 +1000 Subject: [PATCH] Can we call deprecate_constant without checking respond_to? --- lib/i18n/interpolate/ruby.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/i18n/interpolate/ruby.rb b/lib/i18n/interpolate/ruby.rb index 51868044..13171d30 100644 --- a/lib/i18n/interpolate/ruby.rb +++ b/lib/i18n/interpolate/ruby.rb @@ -8,7 +8,7 @@ module I18n /%<(\w+)>(.*?\d*\.?\d*[bBdiouxXeEfgGcps])/ # matches placeholders like "%.d" ].freeze INTERPOLATION_PATTERN = Regexp.union(DEFAULT_INTERPOLATION_PATTERNS) - deprecate_constant :INTERPOLATION_PATTERN if respond_to? :deprecate_constant + deprecate_constant :INTERPOLATION_PATTERN class << self # Return String or raises MissingInterpolationArgument exception.