File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 4
4
5
5
- Fix a false positive in ` RSpec/IndexedLet ` with suffixes after index-like numbers. ([ @pirj ] )
6
6
- Fix an error for ` RSpec/Rails/HaveHttpStatus ` with comparison with strings containing non-numeric characters. ([ @ydah ] )
7
+ - Fix an error for ` RSpec/MatchArray ` when ` match_array ` with no argument. ([ @ydah ] )
7
8
8
9
## 2.20.0 (2023-04-18)
9
10
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ class MatchArray < Base
34
34
PATTERN
35
35
36
36
def on_send ( node )
37
- return unless node . first_argument . array_type?
37
+ return unless node . first_argument & .array_type?
38
38
return if match_array_with_empty_array? ( node )
39
39
40
40
check_populated_array ( node )
Original file line number Diff line number Diff line change 48
48
it { is_expected.to match_array([]) }
49
49
RUBY
50
50
end
51
+
52
+ it 'does not flag `match_array` with no argument' do
53
+ expect_no_offenses ( <<-RUBY )
54
+ it { is_expected.to match_array }
55
+ it { is_expected.to match_array() }
56
+ RUBY
57
+ end
51
58
end
You can’t perform that action at this time.
0 commit comments