diff options
| author | Geremia Taglialatela <[email protected]> | 2023-06-10 11:48:13 +0200 |
|---|---|---|
| committer | Geremia Taglialatela <[email protected]> | 2023-06-10 11:48:13 +0200 |
| commit | ee14c1bf5c6aaa96867eb4b90b510f91c3a614f8 (patch) | |
| tree | 63a893a73f1cc51003edf218fed178bb93c604d7 /test/workbook/worksheet/tc_worksheet.rb | |
| parent | cfb516062de3d0725b3245cc328f96d702d662d3 (diff) | |
| download | caxlsx-ee14c1bf5c6aaa96867eb4b90b510f91c3a614f8.tar.gz caxlsx-ee14c1bf5c6aaa96867eb4b90b510f91c3a614f8.zip | |
Fix safe Style/ColonMethodCall offenses
Caxlsx is using both `.` and `::`, 220 occurrences vs 280 to invoke
methods on `Axlsx` module.
This commit standardizes the approach towards `.`, which will also allow
shorter lines.
Performance is not affected
```
Comparison:
Axlsx.validate: 8515252.3 i/s
Axlsx::validate: 8512863.7 i/s - same-ish: difference falls within error
```
Diffstat (limited to 'test/workbook/worksheet/tc_worksheet.rb')
| -rw-r--r-- | test/workbook/worksheet/tc_worksheet.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/workbook/worksheet/tc_worksheet.rb b/test/workbook/worksheet/tc_worksheet.rb index 4ec74efb..464d2e64 100644 --- a/test/workbook/worksheet/tc_worksheet.rb +++ b/test/workbook/worksheet/tc_worksheet.rb @@ -456,14 +456,14 @@ class TestWorksheet < Test::Unit::TestCase end def test_to_xml_string_with_illegal_chars - old = Axlsx::trust_input - Axlsx::trust_input = false + old = Axlsx.trust_input + Axlsx.trust_input = false nasties = "\v\u2028\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u001f" @ws.add_row [nasties] assert_equal(0, @ws.rows.last.cells.last.value.index("\v")) assert_nil(@ws.to_xml_string.index("\v")) - Axlsx::trust_input = old + Axlsx.trust_input = old end def test_to_xml_string_with_newlines |
