Skip to content

Commit

Permalink
Merge pull request #532 from ruby-i18n/deprecate-constant
Browse files Browse the repository at this point in the history
Can we call deprecate_constant without checking respond_to?
  • Loading branch information
radar committed Jun 24, 2020
2 parents 4e1a134 + 76c677a commit c2d85c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/i18n/interpolate/ruby.rb
Expand Up @@ -8,7 +8,7 @@ module I18n
/%<(\w+)>(.*?\d*\.?\d*[bBdiouxXeEfgGcps])/ # matches placeholders like "%<foo>.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.
Expand Down

0 comments on commit c2d85c0

Please sign in to comment.