Skip to content

Commit 4e1a134

Browse files
authored
Merge pull request #531 from Fatsoma/deprecate_constant_interpolation_pattern
Fix deprecate_constant INTERPOLATION_PATTERN
2 parents f59c50f + 87b0718 commit 4e1a134

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/i18n/interpolate/ruby.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module I18n
88
/%<(\w+)>(.*?\d*\.?\d*[bBdiouxXeEfgGcps])/ # matches placeholders like "%<foo>.d"
99
].freeze
1010
INTERPOLATION_PATTERN = Regexp.union(DEFAULT_INTERPOLATION_PATTERNS)
11-
deprecate_constant :INTERPOLATION_PATTERN if method_defined? :INTERPOLATION_PATTERN
11+
deprecate_constant :INTERPOLATION_PATTERN if respond_to? :deprecate_constant
1212

1313
class << self
1414
# Return String or raises MissingInterpolationArgument exception.

0 commit comments

Comments
 (0)