Skip to content

Commit

Permalink
Merge pull request #557 from ruby-i18n/ca-except-ruby3
Browse files Browse the repository at this point in the history
Prevent overwriting `Hash#except` method present in Ruby 3+
  • Loading branch information
radar authored Feb 12, 2021
2 parents 7a262de + cead3e5 commit 3951eee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/i18n/core_ext/hash.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module HashRefinements
using I18n::HashRefinements
def except(*keys)
dup.except!(*keys)
end
end unless method_defined?(:except)

def except!(*keys)
keys.each { |key| delete(key) }
Expand Down

0 comments on commit 3951eee

Please sign in to comment.