diff options
| author | Geremia Taglialatela <[email protected]> | 2023-05-31 17:31:59 +0200 |
|---|---|---|
| committer | Geremia Taglialatela <[email protected]> | 2023-05-31 17:31:59 +0200 |
| commit | 4e555613a021639c12be713c438bb124622c72d3 (patch) | |
| tree | e629fb11f494e85fa1e6205792111b83474d45d9 /lib/axlsx/workbook/worksheet/worksheet.rb | |
| parent | ad87c51bf8c8f59a36514bb95dc6d3a582c6b2fd (diff) | |
| download | caxlsx-4e555613a021639c12be713c438bb124622c72d3.tar.gz caxlsx-4e555613a021639c12be713c438bb124622c72d3.zip | |
Remove redundant parentheses
- Style/ParenthesesAroundCondition
- Style/RedundantParentheses
- Style/TernaryParentheses
`Style/ParenthesesAroundCondition` may be questionable, but a majority
of comparison where not using parentheses, so offenses have been fixed
for uniformity across the codebase
Diffstat (limited to 'lib/axlsx/workbook/worksheet/worksheet.rb')
| -rw-r--r-- | lib/axlsx/workbook/worksheet/worksheet.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/axlsx/workbook/worksheet/worksheet.rb b/lib/axlsx/workbook/worksheet/worksheet.rb index 90461c66..f2587edb 100644 --- a/lib/axlsx/workbook/worksheet/worksheet.rb +++ b/lib/axlsx/workbook/worksheet/worksheet.rb @@ -753,7 +753,7 @@ module Axlsx def validate_sheet_name(name) DataTypeValidator.validate :worksheet_name, String, name # ignore first character (BOM) after encoding to utf16 because Excel does so, too. - raise ArgumentError, (ERR_SHEET_NAME_EMPTY) if name.empty? + raise ArgumentError, ERR_SHEET_NAME_EMPTY if name.empty? character_length = name.encode("utf-16")[1..-1].encode("utf-16").bytesize / 2 raise ArgumentError, (ERR_SHEET_NAME_TOO_LONG % name) if character_length > WORKSHEET_MAX_NAME_LENGTH |
