rubocop-performance 1.21.0 → 1.21.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd286ebd5cb0d982f759a355a86281898577db559004bef9bfb53b8493a32934
|
4
|
+
data.tar.gz: f3e101a14918c3efa6dc657841471b22afec47d54ce70442567d54ffc3ee8ed5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d6df8e36cbb224d892f14e7fb1eeccf34c887c9fd6e9ad302889ab71b64e48db3c3167291f210ad7e69a23f5e4720ae23ee767c4a569701d09e8fa771ede28c
|
7
|
+
data.tar.gz: 428da3a79195bcf8c715a1962c5bea38a08ee2973c0450b78fc24ceeb376a4f984b3d4f91efba93c799d28986dda22f711e90937738007abbd41b470a484a887
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# RuboCop Performance
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/rubocop-performance.svg)](https://badge.fury.io/rb/rubocop-performance)
|
4
|
-
[![
|
4
|
+
[![CI](https://github.com/rubocop/rubocop-performance/actions/workflows/test.yml/badge.svg)](https://github.com/rubocop/rubocop-performance/actions/workflows/test.yml)
|
5
5
|
[![Discord](https://img.shields.io/badge/chat-on%20discord-7289da.svg?sanitize=true)](https://discord.gg/wJjWvGRDmm)
|
6
6
|
|
7
7
|
Performance optimization analysis for your projects, as an extension to [RuboCop](https://github.com/rubocop/rubocop).
|
@@ -8,8 +8,9 @@ module RuboCop
|
|
8
8
|
# This cop identifies places where `map { ... }.compact` can be replaced by `filter_map`.
|
9
9
|
#
|
10
10
|
# @safety
|
11
|
-
# This cop's autocorrection is unsafe because `map { ... }.compact`
|
12
|
-
#
|
11
|
+
# This cop's autocorrection is unsafe because `map { ... }.compact` might yield
|
12
|
+
# different results than `filter_map`. As illustrated in the example, `filter_map`
|
13
|
+
# also filters out falsy values, while `compact` only gets rid of `nil`.
|
13
14
|
#
|
14
15
|
# [source,ruby]
|
15
16
|
# ----
|
@@ -64,7 +64,7 @@ module RuboCop
|
|
64
64
|
return unless one_block_argument?(node.arguments)
|
65
65
|
|
66
66
|
block_argument = node.first_argument
|
67
|
-
block_body = node.body
|
67
|
+
return unless (block_body = node.body)
|
68
68
|
return unless use_equality_comparison_block?(block_body)
|
69
69
|
return if same_block_argument_and_is_a_argument?(block_body, block_argument)
|
70
70
|
return unless (new_argument = new_argument(block_argument, block_body))
|
metadata
CHANGED
@@ -1,16 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubocop-performance
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.21.
|
4
|
+
version: 1.21.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bozhidar Batsov
|
8
8
|
- Jonas Arvidsson
|
9
9
|
- Yuji Nakayama
|
10
|
-
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date: 2024-
|
12
|
+
date: 2024-06-16 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: rubocop
|
@@ -133,7 +132,6 @@ metadata:
|
|
133
132
|
documentation_uri: https://docs.rubocop.org/rubocop-performance/1.21/
|
134
133
|
bug_tracker_uri: https://github.com/rubocop/rubocop-performance/issues
|
135
134
|
rubygems_mfa_required: 'true'
|
136
|
-
post_install_message:
|
137
135
|
rdoc_options: []
|
138
136
|
require_paths:
|
139
137
|
- lib
|
@@ -148,8 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
146
|
- !ruby/object:Gem::Version
|
149
147
|
version: '0'
|
150
148
|
requirements: []
|
151
|
-
rubygems_version: 3.
|
152
|
-
signing_key:
|
149
|
+
rubygems_version: 3.6.0.dev
|
153
150
|
specification_version: 4
|
154
151
|
summary: Automatic performance checking tool for Ruby code.
|
155
152
|
test_files: []
|