diff options
| author | Geremia Taglialatela <[email protected]> | 2023-06-10 11:20:12 +0200 |
|---|---|---|
| committer | Geremia Taglialatela <[email protected]> | 2023-06-10 11:20:12 +0200 |
| commit | efe986dc759484cc6f82c4e926ff5128784e0fe8 (patch) | |
| tree | 69bf98d7d448efd024a114f71c96aedafb1fb877 /lib/axlsx/workbook/worksheet/cell.rb | |
| parent | cfb516062de3d0725b3245cc328f96d702d662d3 (diff) | |
| download | caxlsx-efe986dc759484cc6f82c4e926ff5128784e0fe8.tar.gz caxlsx-efe986dc759484cc6f82c4e926ff5128784e0fe8.zip | |
Remove redundant `to_s` calls
`clean_value`'s return value is a `String`. That method will return
`@value.to_s`, or it will call `Axlsx.sanitize`, which will return a
`String` in both conditions (
Diffstat (limited to 'lib/axlsx/workbook/worksheet/cell.rb')
| -rw-r--r-- | lib/axlsx/workbook/worksheet/cell.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/axlsx/workbook/worksheet/cell.rb b/lib/axlsx/workbook/worksheet/cell.rb index b9f78fdb..3bb619c7 100644 --- a/lib/axlsx/workbook/worksheet/cell.rb +++ b/lib/axlsx/workbook/worksheet/cell.rb @@ -442,9 +442,10 @@ module Axlsx end end - # Returns the sanatized value - # TODO find a better way to do this as it accounts for 30% of + # Returns the sanitized value + # TODO: find a better way to do this as it accounts for 30% of # processing time in benchmarking... + # @return [String] The sanitized value def clean_value if (type == :string || type == :text) && !Axlsx::trust_input Axlsx::sanitize(::CGI.escapeHTML(@value.to_s)) |
