rubocop-sane_conditionals 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 37b01bed64073895541d1f18865e4a4e0122a7bbd9482e46d2b4600a0aa172ce
4
- data.tar.gz: 2255d24b02bc8d981b84502ac109953dfba47b989df7573e867bd993f1389df3
3
+ metadata.gz: 0b1b33f01a4f7642c1575d456ab219a299a62bdaf32c397cf951da6e722ddf14
4
+ data.tar.gz: 21892e4452d18254df7cf405a4043ef579814737f97560b97068dcb28adc92df
5
5
  SHA512:
6
- metadata.gz: 3b066293223f7cdf908a1df62e0d6e1c434d6cd911896241a4e3011a4565452cc0e947b3c2faa38b09600f2b2c6b32c6e20929518c146a9b7db9323f17d346f3
7
- data.tar.gz: 128feed49dab59c933010b103388500cd6d3e05818f75d789886df67fbaa99add8f38796810827ee7f01b813401d5cb1b969970ca34ce9be3cbf9ab53d9d7800
6
+ metadata.gz: 623671f36690f396ea51bccbc9788365a5d5011f0a29b75ffcf7d66fedac766910d62a25e32d3c472ea64460a05c9a65f2111f0b79ecf86ebb942abbaf2099a0
7
+ data.tar.gz: 43110863121f3016dc6e72909a1142ebf109d00622a372aa2cd6909fa31b4dc574ae495b35329551f112b708e99e1ae2d7996f25c3559e2f94c6b774a51ec4ca
@@ -75,7 +75,8 @@ module RuboCop
75
75
 
76
76
  def requires_parens?(condition_node)
77
77
  condition_node.and_type? || condition_node.or_type? ||
78
- (condition_node.send_type? && condition_node.binary_operation?)
78
+ (condition_node.send_type? && condition_node.binary_operation? &&
79
+ !condition_node.method?(:[]))
79
80
  end
80
81
 
81
82
  def autocorrect_modifier(corrector, node, negated_condition)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RuboCop
4
4
  module SaneConditionals
5
- VERSION = '1.0.1'
5
+ VERSION = '1.0.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-sane_conditionals
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Federico