Skip to content

Commit 8ee9b20

Browse files
committed
Fix Naming/PredicateMethod cop.
* Correct name of `Decompressor#eof?` and swap the alias. * Allow Libbz2 to return booleans from `!` methods.
1 parent 5a22eec commit 8ee9b20

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.rubocop.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,8 @@ Layout/LineLength:
1717

1818
Metrics/MethodLength:
1919
Max: 15
20+
21+
# Allow `!` methods in this file to return boolean values.
22+
Naming/PredicateMethod:
23+
Exclude:
24+
- 'lib/zip/bzip2/libbz2.rb'

lib/zip/bzip2/decompressor.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ def read(length = nil, outbuf = +'')
2020
outbuf.replace(@buffer.slice!(0...(length || @buffer.bytesize)))
2121
end
2222

23-
def eof
23+
def eof?
2424
@buffer.empty? && input_finished?
2525
end
2626

27-
alias eof? eof
27+
alias eof eof?
2828

2929
private
3030

0 commit comments

Comments
 (0)