diff options
Diffstat (limited to 'lib/hashie/mash.rb')
-rw-r--r-- | lib/hashie/mash.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/hashie/mash.rb b/lib/hashie/mash.rb index 97f75d5..194a6f8 100644 --- a/lib/hashie/mash.rb +++ b/lib/hashie/mash.rb @@ -406,7 +406,12 @@ module Hashie end def log_collision?(method_key) - respond_to?(method_key) && !self.class.disable_warnings?(method_key) && + return unless respond_to?(method_key) + + _, suffix = method_name_and_suffix(method_key) + + (!suffix || suffix == '='.freeze) && + !self.class.disable_warnings?(method_key) && !(regular_key?(method_key) || regular_key?(method_key.to_s)) end end |