fix rubocop Style/RedundantBegin cop

This commit is contained in:
Pavel.Lobashov 2015-03-22 19:33:44 +03:00
parent 105c2c71b2
commit 735a0553a3
2 changed files with 4 additions and 11 deletions

View File

@ -250,11 +250,6 @@ Style/PercentLiteralDelimiters:
Style/PredicateName: Style/PredicateName:
Enabled: false Enabled: false
# Offense count: 1
# Cop supports --auto-correct.
Style/RedundantBegin:
Enabled: false
# Offense count: 3 # Offense count: 3
# Configuration parameters: MaxSlashes. # Configuration parameters: MaxSlashes.
Style/RegexpLiteral: Style/RegexpLiteral:

View File

@ -165,13 +165,11 @@ module Zip
private :get_entry private :get_entry
def unix_mode_cmp(fileName, mode) def unix_mode_cmp(fileName, mode)
begin
e = get_entry(fileName) e = get_entry(fileName)
e.fstype == 3 && ((e.external_file_attributes >> 16) & mode ) != 0 e.fstype == 3 && ((e.external_file_attributes >> 16) & mode ) != 0
rescue Errno::ENOENT rescue Errno::ENOENT
false false
end end
end
private :unix_mode_cmp private :unix_mode_cmp
def exists?(fileName) def exists?(fileName)