rubocop 1.81.0 → 1.81.1

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: 740da46aac4303ae1e22af254e9e3032b28d1348feab710e3b7d7670b0803178
4
- data.tar.gz: bdb0f8b8612d6f2576f3497bc07f879b6abeb755d6654428a7df0fc8a8c93a31
3
+ metadata.gz: 2e194323f7062efb4f5777f4039ff475256dfa86b6e95dd63f42f682b3e59a55
4
+ data.tar.gz: 533b2e1fe940252958b245c2d492e0e4b39e37babd9e918fbc3ee505faf030ac
5
5
  SHA512:
6
- metadata.gz: f71823ab8429f83de38d37f56b9fceabec9fba2b119b8525e6dd0bc49082be3c3e94ea6b1a1f9eb5c63a9bf1d27e70bceb26eedade472a9723631c93ce82b7b8
7
- data.tar.gz: 209b99bda6d9d1c140cb1959e33ef84eca2a9791dd97e91c8cba3de172a4f5fa8d3bd8feec7e397c35ea120f084e2f8bd95881bfa69cc8e6832812253d56f045
6
+ metadata.gz: c4bbe12c2a1c627b8f4938a3cc52cd3e4c51ee334b8f1d3b2c373dd109c20741721c090b9152ef2e3f8a908f95c90cc7d8021ba48a1354884361219880153581
7
+ data.tar.gz: 0ee2973781e011caf6069a9072f8f6a59196d0430fe3d90af740bc2795423d4ead9fc62ddbe11bfe2be8230b769446e734eebcf461c494bb2921a3fb16135c7c
@@ -35,8 +35,8 @@ module RuboCop
35
35
  # `false` is the same as `disabled` for backward compatibility.
36
36
  return false if ['disabled', false].include?(cop_config['AutoCorrect'])
37
37
 
38
- # When LSP is enabled, it is considered as editing source code,
39
- # and autocorrection with `AutoCorrect: contextual` will not be performed.
38
+ # When LSP is enabled or the `--editor-mode` option is on, it is considered as editing
39
+ # source code, and autocorrection with `AutoCorrect: contextual` will not be performed.
40
40
  return false if contextual_autocorrect? && LSP.enabled?
41
41
 
42
42
  # :safe_autocorrect is a derived option based on several command-line
@@ -118,8 +118,11 @@ module RuboCop
118
118
 
119
119
  def replacement_args(node)
120
120
  algorithm_constant, = algorithm_const(node)
121
- algorithm_name = algorithm_name(algorithm_constant)
121
+ if algorithm_constant.source == 'OpenSSL::Cipher::Cipher'
122
+ return node.first_argument.source
123
+ end
122
124
 
125
+ algorithm_name = algorithm_name(algorithm_constant)
123
126
  if openssl_class(algorithm_constant) == 'OpenSSL::Cipher'
124
127
  build_cipher_arguments(node, algorithm_name, node.arguments.empty?)
125
128
  else
@@ -94,7 +94,7 @@ module RuboCop
94
94
  def on_itblock(node)
95
95
  case style
96
96
  when :allow_single_line
97
- return if same_line?(node.source_range.begin, node.source_range.end)
97
+ return if node.single_line?
98
98
 
99
99
  add_offense(node, message: MSG_AVOID_IT_PARAMETER_MULTILINE)
100
100
  when :disallow
@@ -36,7 +36,7 @@ module RuboCop
36
36
  def on_numblock(node)
37
37
  if style == :disallow
38
38
  add_offense(node, message: MSG_DISALLOW)
39
- elsif !same_line?(node.source_range.begin, node.source_range.end)
39
+ elsif node.multiline?
40
40
  add_offense(node, message: MSG_MULTI_LINE)
41
41
  end
42
42
  end
@@ -3,7 +3,7 @@
3
3
  module RuboCop
4
4
  # This module holds the RuboCop version information.
5
5
  module Version
6
- STRING = '1.81.0'
6
+ STRING = '1.81.1'
7
7
 
8
8
  MSG = '%<version>s (using %<parser_version>s, ' \
9
9
  'rubocop-ast %<rubocop_ast_version>s, ' \
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: 1.81.0
4
+ version: 1.81.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bozhidar Batsov
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2025-09-25 00:00:00.000000000 Z
13
+ date: 2025-09-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: json
@@ -1092,7 +1092,7 @@ licenses:
1092
1092
  - MIT
1093
1093
  metadata:
1094
1094
  homepage_uri: https://rubocop.org/
1095
- changelog_uri: https://github.com/rubocop/rubocop/releases/tag/v1.81.0
1095
+ changelog_uri: https://github.com/rubocop/rubocop/releases/tag/v1.81.1
1096
1096
  source_code_uri: https://github.com/rubocop/rubocop/
1097
1097
  documentation_uri: https://docs.rubocop.org/rubocop/1.81/
1098
1098
  bug_tracker_uri: https://github.com/rubocop/rubocop/issues