diff options
| author | Zsolt Kozaroczy <[email protected]> | 2023-07-04 09:35:49 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-07-04 09:35:49 +0200 |
| commit | 6fa057cca9a66d9db74710d51787b515d61951f9 (patch) | |
| tree | 1d8c3c099610ec30cb5d1e06904b6d42c3867346 | |
| parent | f2f6177efac76e6015b98c3290fd1839b8568fbe (diff) | |
| parent | 70138e30aa2587134ccfeb20f409fa6eea16dc3f (diff) | |
| download | caxlsx-6fa057cca9a66d9db74710d51787b515d61951f9.tar.gz caxlsx-6fa057cca9a66d9db74710d51787b515d61951f9.zip | |
Merge pull request #291 from tagliala/chore/remove-ruby-18-conditional
Remove conditional check for `encode` method
| -rw-r--r-- | lib/axlsx/util/constants.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/axlsx/util/constants.rb b/lib/axlsx/util/constants.rb index 0767be31..1c5c0033 100644 --- a/lib/axlsx/util/constants.rb +++ b/lib/axlsx/util/constants.rb @@ -397,9 +397,8 @@ module Axlsx # x0A Line Feed (Lf) # x0D Carriage Return (Cr) # x09 Character Tabulation - # @see http://www.codetable.net/asciikeycodes - pattern = "\x0-\x08\x0B\x0C\x0E-\x1F" - pattern = pattern.respond_to?(:encode) ? pattern.encode('UTF-8') : pattern + # @see https://www.codetable.net/asciikeycodes + pattern = "\x0-\x08\x0B\x0C\x0E-\x1F".encode('UTF-8') # The regular expression used to remove control characters from worksheets CONTROL_CHARS = pattern.freeze |
