summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorZsolt Kozaroczy <[email protected]>2023-07-05 14:16:22 +0200
committerGitHub <[email protected]>2023-07-05 14:16:22 +0200
commitd84f333fc3115025ddbc38c274cd6b2e818b4154 (patch)
treeb037216c727133c64ebe37ed089092532306a979
parent692be9e99e0a76d5f6d0b0527466998ca558fe96 (diff)
parentb1475439f462fc065f0f9564d5b72dc62967e233 (diff)
downloadcaxlsx-d84f333fc3115025ddbc38c274cd6b2e818b4154.tar.gz
caxlsx-d84f333fc3115025ddbc38c274cd6b2e818b4154.zip
Merge pull request #292 from tagliala/chore/use-encoding-constant
Use encoding constant instead of hardcoded string
-rw-r--r--lib/axlsx/util/constants.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/axlsx/util/constants.rb b/lib/axlsx/util/constants.rb
index 1c5c0033..70951eb8 100644
--- a/lib/axlsx/util/constants.rb
+++ b/lib/axlsx/util/constants.rb
@@ -398,7 +398,7 @@ module Axlsx
# x0D Carriage Return (Cr)
# x09 Character Tabulation
# @see https://www.codetable.net/asciikeycodes
- pattern = "\x0-\x08\x0B\x0C\x0E-\x1F".encode('UTF-8')
+ pattern = "\x0-\x08\x0B\x0C\x0E-\x1F".encode(Encoding::UTF_8)
# The regular expression used to remove control characters from worksheets
CONTROL_CHARS = pattern.freeze