Incorrect 'Hash[...]' call
Reports improperly constructed Hash[...]
calls. There are 3 correct ways to construct a new hash using [...]
:
Hash['a', 100, 'b', 200]
Hash[ [ ['a', 100], ['b', 200] ] ]
Hash['a' => 100, 'b' => 200]
Inspired by 'Ruby Style Guide'
Inspection Details | |
---|---|
Available in: | Qodana for Ruby 2023.3, RubyMine 2023.3 |
Plugin: | Ruby, 233.SNAPSHOT |
Last modified: 13 July 2023