rubocop 0.44.0 → 0.44.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rubocop might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1631a5c10e3bd5546d7b4a55a63148fabaacf058
4
- data.tar.gz: c7e8faab79e7dabafb495fb1037298b6b3785b3e
3
+ metadata.gz: 07bf77b53e451dd48d1a7d64034070d803897edb
4
+ data.tar.gz: 7313b7607fef2a0d1e45dc08e5d7a6555dee875c
5
5
  SHA512:
6
- metadata.gz: 59371070490a54dba2fc417cb1d00d45eab85e407d9cacf6d457f652ae5721619bfcb891f980f3446dc72a902104afb1da9c7ee022d44f5cab6fdae17dc9ad12
7
- data.tar.gz: eeb000ca52cac9ed4aaec1185444bb8af0928711fceba785c77dfea1e6d512a773cf489d56fa782bab1bb56726ae35e45b56b64ac3d6223bc35b27a40516e799
6
+ metadata.gz: 077d408a822c2e5b18e7e54923edec9c2f2d4fa9d4c42ddfb1042991b910b5aadebf56ef0c9682b33d61f6c7a6ce310c5f5fe41b7c5ee805a98365b25cacc734
7
+ data.tar.gz: e4a0bdb21fd940310ec263e9b0597c89800e50acb428e358a5fc88ca1498fead34c035a509cfd8c03d3341a3f8312dca6feff910a61e6973b8c299fe65cd64f7
data/README.md CHANGED
@@ -51,7 +51,7 @@ haven't reached version 1.0 yet). To prevent an unwanted RuboCop update you
51
51
  might want to use a conservative version locking in your `Gemfile`:
52
52
 
53
53
  ```rb
54
- gem 'rubocop', '~> 0.44.0', require: false
54
+ gem 'rubocop', '~> 0.44.1', require: false
55
55
  ```
56
56
 
57
57
  ## Quickstart
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'pry'
4
3
  module RuboCop
5
4
  module Cop
6
5
  module Performance
@@ -66,9 +65,9 @@ module RuboCop
66
65
  _case_branch, *when_branches, _else_branch = *node
67
66
  when_conditions =
68
67
  when_branches.each_with_object([]) do |branch, conditions|
69
- *condition, _ = *branch
70
- condition.each { |c| conditions << c }
71
- end
68
+ *condition, _ = *branch
69
+ condition.each { |c| conditions << c }
70
+ end
72
71
 
73
72
  splat_offenses(when_conditions).reverse_each do |condition|
74
73
  range = condition.parent.loc.keyword.join(condition.source_range)
@@ -136,12 +135,12 @@ module RuboCop
136
135
 
137
136
  def new_condition_with_then(node, new_condition)
138
137
  "\n#{' ' * node.loc.column}when " \
139
- "#{new_condition} then #{node.children.last.source}"
138
+ "#{new_condition} then #{node.children.last.source}"
140
139
  end
141
140
 
142
141
  def new_branch_without_then(node, body, new_condition)
143
142
  "\n#{' ' * node.loc.column}when #{new_condition}\n" \
144
- "#{' ' * body.loc.column}#{node.children.last.source}"
143
+ "#{' ' * body.loc.column}#{node.children.last.source}"
145
144
  end
146
145
 
147
146
  def splat_offenses(when_conditions)
@@ -3,7 +3,7 @@
3
3
  module RuboCop
4
4
  # This module holds the RuboCop version information.
5
5
  module Version
6
- STRING = '0.44.0'.freeze
6
+ STRING = '0.44.1'.freeze
7
7
 
8
8
  MSG = '%s (using Parser %s, running on %s %s %s)'.freeze
9
9
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.44.0
4
+ version: 0.44.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bozhidar Batsov