Method: RuboCop::Cop::Lint::SharedMutableDefault#hash_initialized_with_mutable_shared_object?
- Defined in:
- lib/rubocop/cop/lint/shared_mutable_default.rb
#hash_initialized_with_mutable_shared_object?(node) ⇒ Object
53 54 55 56 57 58 59 60 61 |
# File 'lib/rubocop/cop/lint/shared_mutable_default.rb', line 53 def_node_matcher :hash_initialized_with_mutable_shared_object?, "{\n (send (const {nil? cbase} :Hash) :new [\n {array hash (send (const {nil? cbase} {:Array :Hash}) :new)}\n !#capacity_keyword_argument?\n ])\n (send (const {nil? cbase} :Hash) :new hash #capacity_keyword_argument?)\n}\n" |